This is a poc for the new code and features inplemented in rev. 550168.
I've modified the list form in the Catalog--> Product --> Locations screen to show the new features now available in form widgets: 1) each item in the list is split into two different rows (position 1 and 2): position 1 is for the facility name, position 2 is for all the remaining fields, including input/hidden/buttons that will go in the form 2) since the fields are derived from a service using the auto-fields-service, I've used the new attribute 'default-position' to set for them the position2 3) we want to show the field at position 1 (facility name) only when facility is different from the previous record: I've used a row-action to set the boolean variable (the action uses the new 'previousItem' map that is now available in the context and contains the data of the previous item in the list) and a use-when attribute git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@550169 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -273,7 +273,7 @@ under the License.
|
||||
</field>
|
||||
|
||||
<field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
|
||||
<field name="deleteLink" title="" widget-style="buttontext">
|
||||
<field name="deleteLink" title=" " widget-style="buttontext">
|
||||
<hyperlink target="deleteProductPrice?productId=${productId}&productPriceTypeId=${productPriceTypeId}&productPricePurposeId=${productPricePurposeId}&currencyUomId=${currencyUomId}&productStoreGroupId=${productStoreGroupId}&fromDate=${fromDate}"
|
||||
description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
|
||||
</field>
|
||||
@@ -1334,17 +1334,19 @@ under the License.
|
||||
<entity-one entity-name="Enumeration" value-name="locationType">
|
||||
<field-map field-name="enumId" env-name="facilityLocation.locationTypeEnumId"/>
|
||||
</entity-one>
|
||||
<set field="showPosition1" value="${bsh:String prev=(String)previousItem.get("facilityId");return new Boolean(!(prev!=null&&prev.equals(facilityId)));}" type="Boolean"/>
|
||||
</row-actions>
|
||||
<auto-fields-service service-name="updateProductFacilityLocation"/>
|
||||
<field name="productId"><hidden/></field>
|
||||
<field name="facilityId">
|
||||
<display-entity entity-name="Facility" description="${facilityName} [${facilityId}]" also-hidden="true"/>
|
||||
<auto-fields-service service-name="updateProductFacilityLocation" default-position="2"/>
|
||||
<field name="productId" position="2"><hidden/></field>
|
||||
<field name="facilityName" entry-name="facilityId" position="1" use-when="showPosition1">
|
||||
<display-entity entity-name="Facility" key-field-name="facilityId" description="${facilityName} [${facilityId}]" also-hidden="false"/>
|
||||
</field>
|
||||
<field name="locationSeqId">
|
||||
<field name="facilityId" position="2"><hidden/></field>
|
||||
<field name="locationSeqId" position="2">
|
||||
<display description="${facilityLocation.areaId} ${facilityLocation.aisleId} ${facilityLocation.sectionId} ${facilityLocation.levelId} ${facilityLocation.positionId} [${locationSeqId}] (${locationType.description})"/>
|
||||
</field>
|
||||
<field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
|
||||
<field name="deleteLink" title="" widget-style="buttontext">
|
||||
<field name="submitButton" position="2" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field>
|
||||
<field name="deleteLink" position="2" title=" " widget-style="buttontext">
|
||||
<hyperlink target="deleteProductFacilityLocation?productId=${productId}&facilityId=${facilityId}&locationSeqId=${locationSeqId}"
|
||||
description="${uiLabelMap.CommonDelete}" also-hidden="false"/>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user