Author: deepak
Date: Sun Jun 26 09:18:56 2016
New Revision: 1750240
URL: http://svn.apache.org/viewvc?rev=1750240&view=rev
Log:
(OFBIZ-6144) Applied patch jira issue.
===========================================
Convert FindShipment ftl to form widget
===========================================
Thanks Christian Carlow and Pawan for your contribution.
Removed:
ofbiz/trunk/applications/product/groovyScripts/facility/shipment/FindShipment.groovy
ofbiz/trunk/applications/product/template/shipment/FindShipment.ftl
Modified:
ofbiz/trunk/applications/product/widget/facility/ShipmentForms.xml
ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml
Modified: ofbiz/trunk/applications/product/widget/facility/ShipmentForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/ShipmentForms.xml?rev=1750240&r1=1750239&r2=1750240&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/ShipmentForms.xml
(original)
+++ ofbiz/trunk/applications/product/widget/facility/ShipmentForms.xml Sun Jun
26 09:18:56 2016
@@ -20,6 +20,68 @@ under the License.
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form"
xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form
http://ofbiz.apache.org/dtds/widget-form.xsd">
+
+ <form name="FindShipment" type="single" target="FindShipment"
+ header-row-style="header-row" default-table-style="basic-table">
+ <field name="shipmentId"
title="${uiLabelMap.ProductShipmentId}"><text-find/></field>
+ <field name="noConditionFind"><hidden value="Y"/></field>
+ <field name="shipmentTypeId" title="${uiLabelMap.ProductShipmentType}">
+ <drop-down allow-empty="true">
+ <entity-options description="${description}"
entity-name="ShipmentType">
+ <entity-order-by field-name="shipmentTypeId"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="originFacilityId"
title="${uiLabelMap.ProductOriginFacility}">
+ <drop-down allow-empty="true">
+ <entity-options description="${facilityName}"
entity-name="Facility" key-field-name="facilityId">
+ <entity-order-by field-name="facilityName"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="destinationFacilityId"
title="${uiLabelMap.ProductDestinationFacility}">
+ <drop-down allow-empty="true">
+ <entity-options description="${facilityName}"
entity-name="Facility" key-field-name="facilityId">
+ <entity-order-by field-name="facilityName"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="statusId" title="${uiLabelMap.CommonStatus}">
+ <drop-down allow-empty="true">
+ <entity-options description="${description}"
entity-name="StatusItem" key-field-name="statusId">
+ <entity-constraint name="statusTypeId"
value="SHIPMENT_STATUS"/>
+ <entity-order-by field-name="description"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="estimatedShipDate"
title="${uiLabelMap.ProductEstimatedShipDate}"><date-find/></field>
+ <field name="entryDate"
title="${uiLabelMap.FormFieldTitle_entryDate}"><date-find/></field>
+ <field name="submitButton" title="${uiLabelMap.CommonSubmit}">
+ <submit button-type="button"/>
+ </field>
+ </form>
+ <form name="ListShipment" type="list" target="updateShipment"
list-name="listIt"
+ header-row-style="header-row" default-table-style="basic-table"
odd-row-style="alternate-row">
+ <actions>
+ <service service-name="performFind" result-map="result"
result-map-list="listIt">
+ <field-map field-name="inputFields" from-field="parameters"/>
+ <field-map field-name="entityName" value="Shipment"/>
+ <field-map field-name="viewIndex" from-field="viewIndex"/>
+ <field-map field-name="viewSize" from-field="viewSize"/>
+ </service>
+ </actions>
+ <field name="shipmentId" title="${uiLabelMap.ProductShipmentId}"
widget-style="buttontext">
+ <hyperlink target="EditShipment" description="${shipmentId}">
+ <parameter param-name="shipmentId" from-field="shipmentId"/>
+ </hyperlink>
+ </field>
+ <field name="shipmentTypeId"
title="${uiLabelMap.ProductShipmentType}"><display-entity
entity-name="ShipmentType"/></field>
+ <field name="statusId"
title="${uiLabelMap.CommonStatus}"><display-entity
entity-name="StatusItem"/></field>
+ <field name="originFacilityId"
title="${uiLabelMap.ProductOriginFacility}"><display-entity
entity-name="Facility" description="${facilityName}"
key-field-name="facilityId"/></field>
+ <field name="destinationFacilityId"
title="${uiLabelMap.ProductDestinationFacility}"><display-entity
entity-name="Facility" description="${facilityName}"
key-field-name="facilityId"/></field>
+ <field name="estimatedShipDate"
title="${uiLabelMap.ProductEstimatedShipDate}"><display/></field>
+ <field name="entryDate"
title="${uiLabelMap.FormFieldTitle_entryDate}"><display/></field>
+ </form>
<form name="EditShipment" type="single" target="updateShipment" title=""
default-map-name="shipment"
header-row-style="header-row" default-table-style="basic-table">
<alt-target use-when="shipment==null&&shipmentTypeId==null"
target="createShipment"/>
Modified: ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml?rev=1750240&r1=1750239&r2=1750240&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml
(original)
+++ ofbiz/trunk/applications/product/widget/facility/ShipmentScreens.xml Sun
Jun 26 09:18:56 2016
@@ -25,7 +25,6 @@ under the License.
<actions>
<set field="titleProperty" value="ProductFindShipment"/>
<set field="headerItem" value="shipment"/>
- <script
location="component://product/groovyScripts/facility/shipment/FindShipment.groovy"/>
</actions>
<widgets>
<decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
@@ -52,14 +51,17 @@ under the License.
<actions>
<set field="titleProperty" value="ProductFindShipment"/>
<set field="headerItem" value="shipment"/>
- <script
location="component://product/groovyScripts/facility/shipment/FindShipment.groovy"/>
</actions>
<widgets>
<decorator-screen name="CommonShipmentMainDecorator"
location="${parameters.commonShipmentDecoratorLocation}">
<decorator-section name="body">
- <platform-specific>
- <html><html-template
location="component://product/template/shipment/FindShipment.ftl"/></html>
- </platform-specific>
+ <link target="EditShipment"
text="${uiLabelMap.ProductNewShipment}" style="buttontext"></link>
+ <screenlet title="${uiLabelMap.ProductFindShipment}">
+ <include-form name="FindShipment"
location="component://product/widget/facility/ShipmentForms.xml"/>
+ </screenlet>
+ <screenlet title="${uiLabelMap.ProductShipmentsFound}">
+ <include-form name="ListShipment"
location="component://product/widget/facility/ShipmentForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -214,7 +216,9 @@ under the License.
<widgets>
<decorator-screen name="CommonShipmentDecorator"
location="${parameters.commonShipmentDecoratorLocation}">
<decorator-section name="body">
- <include-form name="EditShipment"
location="component://product/widget/facility/ShipmentForms.xml"/>
+ <screenlet title="${uiLabelMap.ProductEditShipment}">
+ <include-form name="EditShipment"
location="component://product/widget/facility/ShipmentForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>