Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-5040 Backend widget & application HTML clean-up
  3. OFBIZ-5396

Add ability to set <drop-down>, <radio>, <check> form widget field key values manually

Attach filesAttach ScreenshotVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
    • Sprint:
      Bug Crush Event - 21/2/2015


      OFBiz should allow for the ability set <drop-down>, <radio>, and <check> form widget fields key values manually for <list-options> and <entity-options>. Currently the key-field-name attribute of <entity-options> and <list-options> is the only way it can be set and the value must be set to the name of a single entity or list field.

      I am trying to improve the order entry shipment settings forms and wanted to create a <drop-down> form widget field to replace the list of radio options with values


      on the Ship Options page of Order Entry. The problem is that the key-field-name attribute mentioned above is insufficient for handling such a "multi-key" value.

      Adding something such as a "key-value" attribute could allow for manual assignment of the <option> value attributes.

      Lookup fields are also weak when it comes to multi-key entities. A while back I posted about not being able to create a lookup for order items because of the OrderId, OrderItemSeqId multi-key: OFBIZ-5356

      As work around to this problem I create a view-entity of an entity with the primary key being set to a concatenated string of the primary keys. For example, to allow for a lookup field that provides a list of OrderItems I would create:

      <view-entity entity-name="OrderItemOnePrimKey" package-name="org.ofbiz.order.order">
          <member-entity entity-alias="OI" entity-name="OrderItem"></member-entity>
          <alias-all entity-alias="OI" />
          <alias name="orderItemId" prim-key="orderItemId">
          <complex-alias operator="||">
             <complex-alias-field entity-alias="OI" field="orderId" />
             <complex-alias-field value="'_pk_'"/>
             <complex-alias-field entity-alias="OI" field="orderItemSeqId"/>

      Having to do this for every entity with more than one key is redundant. The keys should be able to be set manually if need be.


        Issue Links



            • Assignee:
              ofbizzer Christian Carlow


              • Created:


                  Issue deployment