You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Martin Kaiser <ma...@gmail.com> on 2012/07/05 11:21:38 UTC

dropdown in freemarker templates

Hi all,

is there a simple way to retrieve the options of a select field using
the freemarker template? I want to have the same behavior as using
e.g. the snippet

           <drop-down allow-empty="true">
                <entity-options entity-name="DataSource"
key-field-name="dataSourceId" description="${dataSourceId} -
${description}">
                    <entity-constraint name="dataSourceTypeId"
operator="equals" value="LEAD_SOURCE"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>

of a form xml, where the drop down options are fetched from the
database. I already found something similar, but there was a service
used to get the values. Do I have to go the same way, or is there a
generic service with which I could retrieve the options?

thanks.

martin