<@htmlTemplate.lookup Field ofbiz syntax

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

<@htmlTemplate.lookup Field ofbiz syntax

shilpa

Hi Friends  ,

please help me ,that I am not getting bellow syntax .How this is working means it is calling jquery.which folder i need to refer for this syntax.They used this is in editfacility.ftl file.

<@htmlTemplate.lookupField value="${facility.parentFacilityId?if_exists}" formName="EditFacilityForm" name="parentFacilityId" id="parentFacilityId" fieldFormName="LookupFacility"/>


Thanks,

svn
Reply | Threaded
Open this post in threaded view
|

Re: <@htmlTemplate.lookup Field ofbiz syntax

Mohd Viqar
It is used to generate lookup fields.

please refer these files :
htmlTemplate.ftl macro for lookupfield :-

<#macro lookupField className="" alert="" name="" value="" size="20" maxlength="20" id="" event="" action="" readonly="" autocomplete="" descriptionFieldName="" formName="" fieldFormName="" targetParameterIter="" imgSrc="" ajaxUrl="" ajaxEnabled="" presentation="layer" width="" height="" position="topleft" fadeBackground="true" clearText="" showDescription="" initiallyCollapsed="">
    <#if (!ajaxEnabled?has_content)>
        <#assign javascriptEnabled = Static["org.ofbiz.base.util.UtilHttp"].isJavaScriptEnabled(request) />
        <#if (javascriptEnabled)>
            <#local ajaxEnabled = true>
        </#if>
    </#if>
    <#if (!id?has_content)>
        <#local id = Static["org.ofbiz.base.util.UtilHttp"].getNextUniqueId(request) />
    </#if>
    <#if (!ajaxUrl?has_content)>
        <#local ajaxUrl = requestAttributes._REQUEST_HANDLER_.makeLink(request, response, fieldFormName)/>
        <#local ajaxUrl = id + "," + ajaxUrl + ",ajaxLookup=Y" />
    </#if>
    <#if (!showDescription?has_content)>
        <#local showDescription = Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue("widget.properties", "widget.lookup.showDescription", "N")>
        <#if "Y" == showDescription>
            <#local showDescription = "true" />
        <#else>
            <#local showDescription = "false" />
        </#if>
    </#if>
        <#if "true" == readonly>
            <#local readonly = true/>
        <#else>
            <#local readonly = false />
        </#if>   
    <@renderLookupField name formName fieldFormName className alert value size maxlength id event action readonly autocomplete descriptionFieldName targetParameterIter imgSrc ajaxUrl ajaxEnabled presentation width height position fadeBackground clearText showDescription initiallyCollapsed/>
</#macro>


htmlFormMacroLibrary.ftl read this for how it actually works: -

search for this in the file and go through it for better understanding
<#macro renderLookupField

Regards
Mohd Viqar

Reply | Threaded
Open this post in threaded view
|

Re: <@htmlTemplate.lookup Field ofbiz syntax

aidne
hello  friend
  I have a question about FLT, when I try to load <@htmlTemplate.lookupField in FLT, how can the parameters to LookupFacilityInventory "fieldFormName=" as a condition



thank you