You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2022/01/16 14:11:16 UTC
[ofbiz-framework] branch trunk updated: Improved: List and Grid (OFBIZ-11345) (#436)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4b19137 Improved: List and Grid (OFBIZ-11345) (#436)
4b19137 is described below
commit 4b191376351ba8c8e9da7ab9d88854e31e5a57cb
Author: Pierre Smits <pi...@orrtiz.com>
AuthorDate: Sun Jan 16 15:11:10 2022 +0100
Improved: List and Grid (OFBIZ-11345) (#436)
According to the definition in widget-form.xsd the use of a combination of a form with type="list" is deprecated in favour of a grid.
Refactor various list forms into grids.
Refactor various list form references in screens.
Modified:
InventoryForms.xml: from form definition with list ref to grid definition with list ref, additional clean-up
FacilityScreens.xml: from form ref to grid ref , additional cleanup
---
.../product/widget/facility/FacilityScreens.xml | 26 +++++++++++++++-------
.../product/widget/facility/InventoryForms.xml | 24 +++++++++-----------
2 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/applications/product/widget/facility/FacilityScreens.xml b/applications/product/widget/facility/FacilityScreens.xml
index 739465d..510f34e 100644
--- a/applications/product/widget/facility/FacilityScreens.xml
+++ b/applications/product/widget/facility/FacilityScreens.xml
@@ -714,7 +714,9 @@ under the License.
<screenlet id="add-facility-group-member" title="${uiLabelMap.ProductAddFacilityGroupMember}" collapsible="true">
<include-form name="AddGroupToFacility" location="component://product/widget/facility/FacilityForms.xml"/>
</screenlet>
- <include-grid name="EditFacilityGroups" location="component://product/widget/facility/FacilityForms.xml"/>
+ <screenlet>
+ <include-grid name="EditFacilityGroups" location="component://product/widget/facility/FacilityForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -745,7 +747,9 @@ under the License.
<screenlet id="add-facility-party-role" title="${uiLabelMap.ProductAddFacilityPartyRole}" collapsible="true">
<include-form name="AddPartyToFacility" location="component://product/widget/facility/FacilityForms.xml"/>
</screenlet>
- <include-grid name="EditFacilityParties" location="component://product/widget/facility/FacilityForms.xml"/>
+ <screenlet>
+ <include-grid name="EditFacilityParties" location="component://product/widget/facility/FacilityForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -915,7 +919,7 @@ under the License.
</condition>
<widgets>
<screenlet id="inventory-item-reservations" title="${uiLabelMap.ProductInventoryItemReservations}" initially-collapsed="true">
- <include-form name="InventoryItemReservations" location="component://product/widget/facility/InventoryForms.xml"/>
+ <include-grid name="InventoryItemReservations" location="component://product/widget/facility/InventoryForms.xml"/>
</screenlet>
</widgets>
</section>
@@ -929,7 +933,9 @@ under the License.
<widgets>
<screenlet id="physical-inventory-variances" title="${uiLabelMap.ProductPhysicalInventoryVariances}" initially-collapsed="true">
<include-form name="CreatePhysicalInventoryAndVariance" location="component://product/widget/facility/InventoryForms.xml"/>
- <include-form name="ViewPhysicalInventoryAndVariance" location="component://product/widget/facility/InventoryForms.xml"/>
+ </screenlet>
+ <screenlet>
+ <include-grid name="ViewPhysicalInventoryAndVariance" location="component://product/widget/facility/InventoryForms.xml"/>
</screenlet>
</widgets>
</section>
@@ -962,10 +968,10 @@ under the License.
<decorator-section name="body">
<include-menu name="InventoryItemTabBar" location="component://product/widget/facility/FacilityMenus.xml"/>
<screenlet title="${uiLabelMap.ProductInventoryDetails} ${uiLabelMap.CommonFor} [${inventoryItemId}]">
- <include-form name="ListInventoryItemDetail" location="component://product/widget/facility/InventoryForms.xml"/>
+ <include-grid name="ListInventoryItemDetail" location="component://product/widget/facility/InventoryForms.xml"/>
</screenlet>
<screenlet title="${uiLabelMap.ProductShipmentReceiptsFor} [${inventoryItemId}]">
- <include-form name="ViewInventoryItemShipmentReceipts" location="component://product/widget/facility/InventoryForms.xml"/>
+ <include-grid name="ViewInventoryItemShipmentReceipts" location="component://product/widget/facility/InventoryForms.xml"/>
</screenlet>
</decorator-section>
</decorator-screen>
@@ -997,7 +1003,9 @@ under the License.
<screenlet id="AddInventoryItemLabelPanel" title="${uiLabelMap.ProductInventoryItemLabels} ${uiLabelMap.CommonFor} [${inventoryItemId}]" collapsible="true">
<include-form name="AddInventoryItemLabelAppl" location="component://product/widget/facility/InventoryForms.xml"/>
</screenlet>
- <include-form name="UpdateInventoryItemLabelAppls" location="component://product/widget/facility/InventoryForms.xml"/>
+ <screenlet>
+ <include-grid name="UpdateInventoryItemLabelAppls" location="component://product/widget/facility/InventoryForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
@@ -1505,7 +1513,9 @@ under the License.
<screenlet id="add-facility-content" title="${uiLabelMap.ProductAddFacilityContent}" collapsible="true">
<include-form name="AddFacilityContent" location="component://product/widget/facility/FacilityForms.xml"/>
</screenlet>
- <include-grid name="ListFacilityContent" location="component://product/widget/facility/FacilityForms.xml"/>
+ <screenlet>
+ <include-grid name="ListFacilityContent" location="component://product/widget/facility/FacilityForms.xml"/>
+ </screenlet>
</decorator-section>
</decorator-screen>
</widgets>
diff --git a/applications/product/widget/facility/InventoryForms.xml b/applications/product/widget/facility/InventoryForms.xml
index d624884..ab5116c 100644
--- a/applications/product/widget/facility/InventoryForms.xml
+++ b/applications/product/widget/facility/InventoryForms.xml
@@ -169,14 +169,14 @@ under the License.
<field name="comments"/>
<field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
- <form name="ViewPhysicalInventoryAndVariance" type="list" target="" title="" list-name="physicalInventoryAndVarianceDatas"
+ <grid name="ViewPhysicalInventoryAndVariance" list-name="physicalInventoryAndVarianceDatas"
header-row-style="header-row-2" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<auto-fields-entity entity-name="PhysicalInventoryAndVariance" map-name="physicalInventoryAndVariance" default-field-type="display"/>
<field name="inventoryItemId"><hidden/></field>
<field name="partyId"><display description="${person.firstName} ${person.lastName} ${partyGroup.groupName} [${physicalInventoryAndVariance.partyId}]"/></field>
<field name="varianceReasonId"><display description="${varianceReason.description}"/></field>
- </form>
- <form name="ViewInventoryItemShipmentReceipts" type="list" target="" title="" list-name="shipmentReceiptList"
+ </grid>
+ <grid name="ViewInventoryItemShipmentReceipts" list-name="shipmentReceiptList"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<actions>
<entity-and entity-name="ShipmentReceipt" list="shipmentReceiptList">
@@ -185,9 +185,8 @@ under the License.
</actions>
<auto-fields-entity entity-name="ShipmentReceipt" map-name="shipmentReceipt" default-field-type="display"/>
<field name="inventoryItemId"><hidden/></field>
- </form>
-
- <form name="ListInventoryItemDetail" type="list" target="" title="" list-name="inventoryItemDetails"
+ </grid>
+ <grid name="ListInventoryItemDetail" list-name="inventoryItemDetails"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<auto-fields-entity entity-name="InventoryItemDetail" map-name="inventoryItemDetail" default-field-type="display"/>
<field name="inventoryItemId"><hidden/></field> <!-- this field is redundant -->
@@ -204,10 +203,8 @@ under the License.
<field name="reasonEnumId">
<display-entity entity-name="Enumeration" key-field-name="enumId"/>
</field>
- <!-- workEffortId - not sure if it's better to show manufacturing or workeffort app
- itemIssuanceId, receiptId, physicalInventoryId - no natural screens to show these -->
- </form>
- <form name="InventoryItemReservations" type="list" target="" title="" list-name="inventoryItemReservations"
+ </grid>
+ <grid name="InventoryItemReservations" list-name="inventoryItemReservations"
header-row-style="header-row-2" odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<auto-fields-entity entity-name="OrderItemShipGrpInvRes" default-field-type="display"/>
<field name="inventoryItemId"><hidden/></field>
@@ -216,9 +213,8 @@ under the License.
<parameter param-name="orderId"/>
</hyperlink>
</field>
- </form>
- <!-- Inventory Item Labels -->
- <form name="UpdateInventoryItemLabelAppls" type="list" target="updateInventoryItemLabelApplFromItem" title="" list-name="inventoryItemLabelAppls"
+ </grid>
+ <grid name="UpdateInventoryItemLabelAppls" list-name="inventoryItemLabelAppls" target="updateInventoryItemLabelApplFromItem"
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
<auto-fields-service service-name="updateInventoryItemLabelAppl"/>
<field name="inventoryItemLabelId" title=" " widget-style="buttontext">
@@ -240,7 +236,7 @@ under the License.
<parameter param-name="facilityId"/>
</hyperlink>
</field>
- </form>
+ </grid>
<form name="AddInventoryItemLabelAppl" type="single" target="createInventoryItemLabelApplFromItem" title=""
header-row-style="header-row" default-table-style="basic-table">
<auto-fields-service service-name="createInventoryItemLabelAppl"/>