You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Avijit Bose <bo...@gmail.com> on 2022/05/14 11:56:17 UTC

FIND return in FTL file

Dear Sir,

My find form is as follows:
-------------------------------------
<form name="FindDomesticCustomers" type="single"
target="FindDomesticCustomers" default-entity-name="AkmCustomer"
        header-row-style="header-row" default-table-style="basic-table">
        <field name="customerTypeId"><hidden value="Domestic"/></field>
        <field name="noConditionFind"><hidden value="Y"/></field>
        <!-- if the above "noConditionFind" field name isn't there
then with all fields empty no query will be done -->

        <field name="customerContactPerson"
title="${uiLabelMap.customerContactPerson}"><text-find
ignore-case="true"/></field>
        <field name="searchButton" title="${uiLabelMap.CommonFind}"
widget-style="smallSubmit">
        <submit button-type="button"
image-location="/images/icons/magnifier.png"/>
        </field>
        </form>
-------------------------------------

I am getting the find result in a List form as shown below:
--------------------------------
<form name="ListDomesticCustomers" type="list" list-name="listIt"
paginate-target="FindDomesticCustomers"
        default-entity-name="AkmCustomer" separate-columns="true"
odd-row-style="alternate-row"
        header-row-style="header-row-2"
default-table-style="basic-table hover-bar">
        <actions>
        <service service-name="performFind" result-map="result"
result-map-list="listIt">
<field-map field-name="inputFields" from-field="eximCtx"/>
<field-map field-name="entityName" value="AkmCustomer"/>
<field-map field-name="orderBy" from-field="parameters.sortField"/>
<field-map field-name="viewIndex" from-field="viewIndex"/>
<field-map field-name="viewSize" from-field="viewSize"/>
</service>
        </actions>
        <field name="customerContactPerson"
title="${uiLabelMap.customerContactPerson}"
sort-field="false"><display/></field>
        </form>
--------------------------------


listing.ftl
-----------------------
<table class="styled-table" style="width:100%">
    <thead>
        <tr>
          <th style="width:8%">${uiLabelMap.customerContactPerson}</th>
        </tr>
    </thead>
    <tbody>
        <#list domesticCustomerList as domCustomer>
            <tr>
              <td>${domCustomer.customerContactPerson!}</td>
            </tr>
        </#list>
    </tbody>
</table>
-----------------------

My query :: Instead of getting the find result in the list form as
mentioned above, is it possible to get the find result list in a FTL
page.... as shown above. In other words ... how do I populate the find
return in a FTL page.

regards
Avijit