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 9a5c957  Improved: List and Grid (OFBIZ-11345) (#366)
9a5c957 is described below

commit 9a5c9572853c9abac2be6ba1b7355f75f43b3c0c
Author: Pierre Smits <[email protected]>
AuthorDate: Mon Nov 29 09:00:54 2021 +0100

    Improved: List and Grid (OFBIZ-11345) (#366)
    
    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:
    GlScreens.xml: from form ref to grid ref , additional cleanup
    GlForms.xml: from form definition with list ref to grid definition with 
list ref, additional clean-up
---
 applications/accounting/widget/GlForms.xml   | 48 +++++++++++++---------------
 applications/accounting/widget/GlScreens.xml | 22 ++++++-------
 2 files changed, 33 insertions(+), 37 deletions(-)

diff --git a/applications/accounting/widget/GlForms.xml 
b/applications/accounting/widget/GlForms.xml
index e942272..6429b5e 100644
--- a/applications/accounting/widget/GlForms.xml
+++ b/applications/accounting/widget/GlForms.xml
@@ -66,7 +66,7 @@ under the License.
         <field name="searchButton" widget-style="buttontext"><submit 
button-type="text-link"/></field>
     </form>
 
-    <form name="ListAcctgTrans" type="list" title="List Accounting 
Transactions" list-name="acctgTransList"
+    <grid name="ListAcctgTrans" title="List Accounting Transactions" 
list-name="acctgTransList"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <actions>
             <entity-condition entity-name="AcctgTransAndEntries" 
list="acctgTransList" distinct="true">
@@ -99,7 +99,6 @@ under the License.
                 <order-by field-name="-transactionDate"/>
             </entity-condition>
         </actions>
-
         <field name="acctgTransId" widget-style="buttontext">
             <hyperlink description="${acctgTransId}" target="EditAcctgTrans" 
also-hidden="false">
                 <parameter param-name="acctgTransId"/>
@@ -147,9 +146,9 @@ under the License.
             </hyperlink>
         </field>
         <field name="postAcctgTrans" title=" " 
use-when="!'N'.equals(isPosted)"><display/></field>
-    </form>
+    </grid>
 
-    <form name="ListUnpostedAcctgTrans" type="list" title="Unposted Accounting 
Transactions" list-name="transactions"
+    <grid name="ListUnpostedAcctgTrans" list-name="transactions"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <field name="acctgTransId" widget-style="buttontext">
             <hyperlink description="${acctgTransId}" target="EditAcctgTrans" 
also-hidden="false">
@@ -188,7 +187,7 @@ under the License.
                 <parameter param-name="organizationPartyId"/>
             </hyperlink>
         </field>
-    </form>
+    </grid>
 
     <form name="FindAcctgTransEntries" target="FindAcctgTransEntries" 
type="single" title=""
         header-row-style="header-row" default-table-style="basic-table">
@@ -251,7 +250,7 @@ under the License.
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonFind}" 
widget-style="buttontext"><submit button-type="text-link"/></field>
     </form>
-    <form name="ListFindAcctgTransEntriesByAccount" type="list" title="List 
Accounting Transaction Entries" list-name="acctgTransEntryList"
+    <grid name="ListFindAcctgTransEntriesByAccount" title="List Accounting 
Transaction Entries" list-name="acctgTransEntryList"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <actions>
             <entity-condition entity-name="AcctgTransAndEntries" 
list="acctgTransEntryList">
@@ -286,7 +285,6 @@ under the License.
         <field name="glAccountClassId" position="1" use-when="showPosition1">
             <display-entity entity-name="GlAccountClass"/>
         </field>
-
         <field name="acctgTransId" widget-style="buttontext" position="2">
             <hyperlink description="${acctgTransId}" target="EditAcctgTrans" 
also-hidden="false">
                 <parameter param-name="acctgTransId"/>
@@ -337,8 +335,8 @@ under the License.
         <field name="postedDate" position="2"><display/></field>
         <field name="debitCreditFlag" position="2"><display/></field>
         <field name="amount" position="2"><display type="currency" 
currency="${currencyUomId}"/></field>
-    </form>
-    <form name="ListFindAcctgTransEntriesByDate" type="list" title="List 
Accounting Transaction Entries" list-name="acctgTransEntryList"
+    </grid>
+    <grid name="ListFindAcctgTransEntriesByDate" title="List Accounting 
Transaction Entries" list-name="acctgTransEntryList"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <actions>
             <entity-condition entity-name="AcctgTransAndEntries" 
list="acctgTransEntryList">
@@ -362,7 +360,6 @@ under the License.
                 <order-by field-name="-transactionDate"/>
             </entity-condition>
         </actions>
-
         <field name="transactionDate"><display/></field>
         <field name="acctgTransId" widget-style="buttontext">
             <hyperlink description="${acctgTransId}" target="EditAcctgTrans" 
also-hidden="false">
@@ -420,7 +417,7 @@ under the License.
         <field name="postedDate"><display/></field>
         <field name="debitCreditFlag"><display/></field>
         <field name="amount"><display type="currency" 
currency="${currencyUomId}"/></field>
-    </form>
+    </grid>
     <form name="CreateAcctgTransAndEntries" type="single" 
target="quickCreateAcctgTransAndEntries" title=""
         header-row-style="header-row" default-table-style="basic-table">
         <actions>
@@ -624,7 +621,7 @@ under the License.
         <field name="description" position="1" 
entry-name="resetFieldValue"><text size="30"/></field>
         <field name="createButton" title="${uiLabelMap.CommonCreate}" 
widget-style="buttontext" ><submit button-type="text-link"/></field>
     </form>
-    <form name="ListAcctgTransEntries" type="list" 
list-name="acctgTransEntries" default-entity-name="AcctgTransEntry" 
target="updateAcctgTransEntry"
+    <grid name="ListAcctgTransEntries" list-name="acctgTransEntries" 
default-entity-name="AcctgTransEntry" target="updateAcctgTransEntry"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <field name="organizationPartyId"><hidden/></field>
         <field name="acctgTransId"><hidden/></field>
@@ -687,7 +684,7 @@ under the License.
                 <parameter param-name="organizationPartyId"/>
             </hyperlink>
         </field>
-    </form>
+    </grid>
     <form name="CreateAcctgTrans" type="single" target="createAcctgTrans"
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-service service-name="createAcctgTrans"/>
@@ -866,7 +863,7 @@ under the License.
         <field name="openingBalance" 
use-when="${groovy:'GLREC_RECONCILED'.equals(glReconciliation?.statusId)}"><display/></field>
         <field use-when="glReconciliationId!=null" name="updateButton" 
title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" ><submit 
button-type="text-link"/></field>
     </form>
-    <form name="ListGlReconciliationEntries" type="list" use-row-submit="true"
+    <grid name="ListGlReconciliationEntries" use-row-submit="true"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <actions>
             <entity-condition entity-name="GlReconciliationEntry">
@@ -880,7 +877,7 @@ under the License.
         <field name="acctgTransEntrySeqId"><display/></field>
         <field name="reconciledAmount"><display/></field>
         <field name="lastUpdatedStamp"><display/></field>
-    </form>
+    </grid>
     <form name="FindGlAccountReconciliations" type="single" title="" 
target="findGlAccountReconciliations"
         header-row-style="header-row" default-table-style="basic-table">
         <field name="organizationPartyId"><hidden/></field>
@@ -897,7 +894,7 @@ under the License.
         <field name="performSearch"><hidden value="Y"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonSearch}" 
widget-style="buttontext"><submit button-type="text-link"/></field>
     </form>
-    <form name="ListGlAccountReconciliations" type="list" 
default-entity-name="GlReconciliation"
+    <grid name="ListGlAccountReconciliations" 
default-entity-name="GlReconciliation"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <actions>
             <entity-condition entity-name="GlReconciliation">
@@ -930,7 +927,7 @@ under the License.
             </hyperlink>
         </field>
         <field name="reconciledBalance"><display/></field>
-    </form>
+    </grid>
     <form name="ViewAcctgTrans" type="single" default-map-name="acctgTrans"
             default-table-style="basic-table">
         <auto-fields-service service-name="updateAcctgTrans" 
default-field-type="display"/>
@@ -1000,7 +997,7 @@ under the License.
             <sort-field name="lastModifiedByUserLogin"/>
         </sort-order>
     </form>
-    <form name="ViewAcctgTransEntries" type="list" 
list-name="acctgTransEntries" default-entity-name="AcctgTransEntry"
+    <grid name="ViewAcctgTransEntries" list-name="acctgTransEntries" 
default-entity-name="AcctgTransEntry"
            default-table-style="basic-table">
         <field name="organizationPartyId"><hidden/></field>
         <field name="acctgTransId"><hidden/></field>
@@ -1034,9 +1031,9 @@ under the License.
         <field name="debitCreditFlag"><display/></field>
         <field name="origAmount"><display type="currency" 
currency="${origCurrencyUomId}"/></field>
         <field name="amount"><display type="currency" 
currency="${currencyUomId}"/></field>
-    </form>
+    </grid>
 
-    <form name="AcctgTransEntriesSearchResultsCsv" type="list" title="List 
Accounting Transaction Entries" list-name="acctgTransEntryList" 
paginate="false">
+    <grid name="AcctgTransEntriesSearchResultsCsv" title="List Accounting 
Transaction Entries" list-name="acctgTransEntryList" paginate="false">
         <actions>
             <entity-condition entity-name="AcctgTransAndEntries" 
list="acctgTransEntryList">
                 <condition-list>
@@ -1077,9 +1074,9 @@ under the License.
         <field name="postedDate"><display/></field>
         <field name="debitCreditFlag"><display/></field>
         <field name="amount"><display/></field>
-    </form>
+    </grid>
 
-    <form name="AcctgTransSearchResultsCsv" type="list" title="List Accounting 
Transactions" list-name="acctgTransList" paginate="false">
+    <grid name="AcctgTransSearchResultsCsv" title="List Accounting 
Transactions" list-name="acctgTransList" paginate="false">
         <actions>
            <entity-condition entity-name="AcctgTransAndEntries" 
list="acctgTransList" result-set-type="forward" distinct="true">
                 <condition-list>
@@ -1120,7 +1117,7 @@ under the License.
         <field name="shipmentId"><display/></field>
         <field name="isPosted"><display/></field>
         <field name="postedDate"><display/></field>
-    </form>
+    </grid>
 
     <form name="AcctgTransDetailReportPdf" type="single" 
default-map-name="acctgTrans">
         <field name="acctgTransId"><display/></field>
@@ -1157,7 +1154,7 @@ under the License.
         <field name="lastModifiedByUserLogin" 
use-when="${acctgTrans.lastModifiedByUserLogin!=null}"><display/></field>
     </form>
 
-    <form name="AcctgTransEntriesDetailReportPdf" type="list" 
list-name="acctgTransEntries">
+    <grid name="AcctgTransEntriesDetailReportPdf" 
list-name="acctgTransEntries">
         <row-actions>
             <entity-one entity-name="GlAccount" value-field="glAccount">
                 <field-map field-name="glAccountId" from-field="glAccountId"/>
@@ -1172,6 +1169,5 @@ under the License.
         <field name="exchangeRate" 
use-when="${origCurrencyUomId!=currencyUomId}"><display 
description="${origAmount/amount} 
${origCurrencyUomId}/${currencyUomId}"/></field>
         <field name="debitAmount"><display type="currency" 
currency="${currencyUomId}" 
description="${groovy:if(debitCreditFlag.equals('D'))return(amount);if(debitCreditFlag.equals('C'))return(0);}"/></field>
         <field name="creditAmount"><display type="currency" 
currency="${currencyUomId}" 
description="${groovy:if(debitCreditFlag.equals('C'))return(amount);if(debitCreditFlag.equals('D'))return(0);}"/></field>
-    </form>
-
+    </grid>
 </forms>
diff --git a/applications/accounting/widget/GlScreens.xml 
b/applications/accounting/widget/GlScreens.xml
index a1e6191..95b6c7a 100644
--- a/applications/accounting/widget/GlScreens.xml
+++ b/applications/accounting/widget/GlScreens.xml
@@ -126,7 +126,7 @@ under the License.
                                         <parameter param-name="fromDate" 
from-field="parameters.fromDate"/>
                                         <parameter param-name="thruDate" 
from-field="parameters.thruDate"/>
                                     </link>
-                                    <include-form name="ListAcctgTrans" 
location="component://accounting/widget/GlForms.xml"/>
+                                    <include-grid name="ListAcctgTrans" 
location="component://accounting/widget/GlForms.xml"/>
                                 </screenlet>
                             </widgets>
                         </section>
@@ -208,7 +208,7 @@ under the License.
                                         <parameter param-name="thruDate" 
from-field="parameters.thruDate"/>
                                         <parameter param-name="paymentId" 
from-field="parameters.paymentId"/>
                                     </link>
-                                    <include-form 
name="ListFindAcctgTransEntriesByAccount" 
location="component://accounting/widget/GlForms.xml"/>
+                                    <include-grid 
name="ListFindAcctgTransEntriesByAccount" 
location="component://accounting/widget/GlForms.xml"/>
                                 </screenlet>
                             </widgets>
                         </section>
@@ -255,7 +255,7 @@ under the License.
                                         <parameter param-name="thruDate" 
from-field="parameters.thruDate"/>
                                         <parameter param-name="paymentId" 
from-field="parameters.paymentId"/>
                                     </link>
-                                    <include-form 
name="ListFindAcctgTransEntriesByDate" 
location="component://accounting/widget/GlForms.xml"/>
+                                    <include-grid 
name="ListFindAcctgTransEntriesByDate" 
location="component://accounting/widget/GlForms.xml"/>
                                 </screenlet>
                             </widgets>
                         </section>
@@ -320,7 +320,7 @@ under the License.
                                             <include-form 
name="ViewAcctgTrans" location="component://accounting/widget/GlForms.xml"/>
                                         </screenlet>
                                         <screenlet 
title="${uiLabelMap.PageTitleViewTransactionEntries}">
-                                            <include-form 
name="ViewAcctgTransEntries" 
location="component://accounting/widget/GlForms.xml"/>
+                                            <include-grid 
name="ViewAcctgTransEntries" 
location="component://accounting/widget/GlForms.xml"/>
                                         </screenlet>
                                     </widgets>
                                     <fail-widgets>
@@ -328,7 +328,7 @@ under the License.
                                             <include-form 
name="EditAcctgTrans" location="component://accounting/widget/GlForms.xml"/>
                                         </screenlet>
                                         <screenlet 
title="${uiLabelMap.PageTitleEditTransactionEntries}">
-                                            <include-form 
name="ListAcctgTransEntries" 
location="component://accounting/widget/GlForms.xml"/>
+                                            <include-grid 
name="ListAcctgTransEntries" 
location="component://accounting/widget/GlForms.xml"/>
                                         </screenlet>
                                         <screenlet 
title="${uiLabelMap.PageTitleAddTransactionEntry}">
                                             <include-form 
name="EditAcctgTransEntry" 
location="component://accounting/widget/GlForms.xml"/>
@@ -359,7 +359,7 @@ under the License.
                 <decorator-screen name="CommonPartyGlDecorator" 
location="${parameters.partyGlDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet 
title="${uiLabelMap.PageTitleUnpostedTransactions}">
-                            <include-form name="ListUnpostedAcctgTrans" 
location="component://accounting/widget/GlForms.xml"/>
+                            <include-grid name="ListUnpostedAcctgTrans" 
location="component://accounting/widget/GlForms.xml"/>
                         </screenlet>
                     </decorator-section>
                 </decorator-screen>
@@ -518,7 +518,7 @@ under the License.
                             <include-form name="EditGlReconciliation" 
location="component://accounting/widget/GlForms.xml"/>
                         </screenlet>
                         <screenlet 
title="${uiLabelMap.AccountingEditAcctRecon}">
-                            <include-form name="ListGlReconciliationEntries" 
location="component://accounting/widget/GlForms.xml"/>
+                            <include-grid name="ListGlReconciliationEntries" 
location="component://accounting/widget/GlForms.xml"/>
                         </screenlet>
                     </decorator-section>
                 </decorator-screen>
@@ -545,7 +545,7 @@ under the License.
                             </condition>
                             <widgets>
                                 <screenlet 
title="${uiLabelMap.AccountingAcctRecons}">
-                                    <include-form 
name="ListGlAccountReconciliations" 
location="component://accounting/widget/GlForms.xml"/>
+                                    <include-grid 
name="ListGlAccountReconciliations" 
location="component://accounting/widget/GlForms.xml"/>
                                 </screenlet>
                             </widgets>
                         </section>
@@ -562,7 +562,7 @@ under the License.
             </actions>
             <widgets>
                 <container>
-                    <include-form name="AcctgTransSearchResultsCsv" 
location="component://accounting/widget/GlForms.xml"/>
+                    <include-grid name="AcctgTransSearchResultsCsv" 
location="component://accounting/widget/GlForms.xml"/>
                 </container>
             </widgets>
         </section>
@@ -575,7 +575,7 @@ under the License.
             </actions>
             <widgets>
                 <container>
-                    <include-form name="AcctgTransEntriesSearchResultsCsv" 
location="component://accounting/widget/GlForms.xml"/>
+                    <include-grid name="AcctgTransEntriesSearchResultsCsv" 
location="component://accounting/widget/GlForms.xml"/>
                 </container>
             </widgets>
         </section>
@@ -677,7 +677,7 @@ under the License.
                 <decorator-screen name="SimpleDecorator" 
location="component://common/widget/CommonScreens.xml">
                     <decorator-section name="body">
                         <include-form name="AcctgTransDetailReportPdf" 
location="component://accounting/widget/GlForms.xml"/>
-                        <include-form name="AcctgTransEntriesDetailReportPdf" 
location="component://accounting/widget/GlForms.xml"/>
+                        <include-grid name="AcctgTransEntriesDetailReportPdf" 
location="component://accounting/widget/GlForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>

Reply via email to