ofbiz Form Operation

1 Drop-down Form:

1.1 Option Value hardcode:

        <field name="monthSelected" title="${uiLabelMap.monthSelected}" widget-style="inputBox">
            <drop-down allow-empty="false">
                <option key="01" description="1-January"/><option key="02" description="2-February"/>
                <option key="03" description="3-March"/><option key="04" description="4-April"/>
                <option key="05" description="5-May"/><option key="06" description="6-June"/>
                <option key="07" description="7-July"/><option key="08" description="8-August"/>
                <option key="09" description="9-September"/><option key="10" description="10-October"/>
                <option key="11" description="11-November"/><option key="12" description="12-December"/>
            </drop-down>
        </field>

1.2 option Value From Entity

field name="accountCurrencyUomId">
            <drop-down allow-empty="false" no-current-selected-key="${defaultCurrencyUomId}">
                <entity-options entity-name="Uom" description="[${abbreviation}] ${description}" key-field-name="uomId">
                    <entity-constraint name="uomTypeId" value="CURRENCY_MEASURE"/>
                    <entity-order-by field-name="abbreviation"/>
                </entity-options>
            </drop-down>
        </field>

你可能感兴趣的:(Opera)