Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
Trunk
-
None
-
None
-
Bug Crush Event - 21/2/2015
Description
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
${shipmentMethodTypeId}@${partyId}
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"/> </complex-alias> </alias> </view-entity>
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.
Attachments
Attachments
Issue Links
- blocks
-
OFBIZ-5400 Improve shopping cart to better handle a large number of ship groups and item associations
- Patch Available
- depends upon
-
OFBIZ-5040 Backend widget & application HTML clean-up
- Closed
- is related to
-
OFBIZ-5356 Ability to select Lookup records having more than one primary key field
- Reopened
- relates to
-
OFBIZ-5387 Improve to allow purchase order ship method options
- Patch Available