Author: jleroux
Date: Tue Nov 14 09:44:57 2017
New Revision: 1815193

URL: http://svn.apache.org/viewvc?rev=1815193&view=rev
Log:
Improved: refactor list related forms in PartyScreen widgets
(OFBIZ-9405)

Refactoring various list forms into grids
Refactoring various list form references in screens

jleroux: slightly adapted because of r1799252

Thanks: Pierre Smits

Modified:
    
ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml
    
ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyScreens.xml

Modified: 
ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=1815193&r1=1815192&r2=1815193&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml 
(original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyForms.xml 
Tue Nov 14 09:44:57 2017
@@ -564,7 +564,7 @@ under the License.
         <field name="submitButton" title="${uiLabelMap.CommonCreate}"><submit 
button-type="button"/></field>
     </form>
 
-    <form name="ListPartyRates" type="list" target="expirePartyRate"
+    <grid name="ListPartyRates" target="expirePartyRate"
         odd-row-style="alternate-row" header-row-style="header-row-2" 
default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="PartyRate" filter-by-date="true">
@@ -593,7 +593,7 @@ under the License.
         <field name="defaultRate"><display/></field>
         <field name="percentageUsed"><display/></field>
         <field name="deleteButton" widget-style="smallSubmit"><submit 
/></field>
-    </form>
+    </grid>
 
     <form name="NewUser" type="single" target="${target}${previousParams}"
         focus-field-name="USER_TITLE" header-row-style="header-row" 
default-table-style="basic-table">
@@ -675,7 +675,7 @@ under the License.
         <field name="submitButton" title="${uiLabelMap.CommonSave}" 
widget-style="smallSubmit"><submit button-type="text-link"/></field>
     </form>
 
-    <form name="ListSegmentRoles" type="list" target="updateSegmentGroupRole"
+    <grid name="ListSegmentRoles" target="updateSegmentGroupRole"
         odd-row-style="alternate-row" header-row-style="header-row-2" 
default-table-style="basic-table hover-bar">
         <actions>
             <entity-and entity-name="SegmentGroupRole">
@@ -699,7 +699,7 @@ under the License.
                 <parameter param-name="roleTypeId"/>
             </hyperlink>
         </field>
-    </form>
+    </grid>
 
     <form name="AddSegmentRole" type="single" target="createSegmentRole" 
default-map-name="segmentGroupRole"
         focus-field-name="segmentGroupId" header-row-style="header-row" 
default-table-style="basic-table">
@@ -815,7 +815,7 @@ under the License.
         <field name="updateButton" use-when="content!=null"><submit 
button-type="button"/></field>
     </form>
 
-    <form name="ListPartyContents" type="list" separate-columns="false"
+    <grid name="ListPartyContents" separate-columns="false"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <actions>
             <entity-and entity-name="PartyContentDetail">
@@ -862,7 +862,7 @@ under the License.
                 <parameter param-name="partyContentTypeId"/>
             </hyperlink>
         </field>
-    </form>
+    </grid>
 
     <form name="ApplyServiceCredit" type="single" target="applyServiceCredit" 
default-map-name="serviceCredit" focus-field-name="amount"
         header-row-style="header-row" default-table-style="basic-table">
@@ -987,7 +987,7 @@ under the License.
         <field name="comments"><display/></field>
     </form>
 
-    <form name="ListPartyRelationships" type="list" 
list-name="partyRelationships" default-table-style="basic-table" 
target="updatePartyRelationship" odd-row-style="alternate-row">
+    <grid name="ListPartyRelationships" list-name="partyRelationships" 
default-table-style="basic-table" target="updatePartyRelationship" 
odd-row-style="alternate-row">
         <field name="partyId"><hidden value="${parameters.partyId}"/></field>
         <field name="partyIdTo" title="${uiLabelMap.PartyPartyId}">
             <display-entity entity-name="PartyNameView" 
description="${firstName} ${middleName} ${lastName} ${groupName}" 
key-field-name="partyId">
@@ -1022,7 +1022,7 @@ under the License.
                 <parameter param-name="roleTypeIdFrom"/>
                 <parameter param-name="fromDate"/>
             </hyperlink></field>
-    </form>
+    </grid>
 
     <form name="AddOtherPartyRelationship" type="single" 
target="createPartyRelationship">
         <field name="partyId"><hidden value="${parameters.partyId}"/></field>
@@ -1088,7 +1088,7 @@ under the License.
         <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit 
button-type="button"/></field>
     </form>
 
-    <form name="ListInvoicesApplPayments" type="list" 
list-name="ListInvoicesApplPayments"
+    <grid name="ListInvoicesApplPayments" list-name="ListInvoicesApplPayments"
         default-title-style="tableheadtext" odd-row-style="alternate-row" 
default-table-style="basic-table hover-bar"
        >
         <actions>
@@ -1122,8 +1122,9 @@ under the License.
         <field name="pmEffectiveDate" 
title="${uiLabelMap.AccountingEffectiveDate}"><display type="date"/></field>
         <field name="pmAmount" title="${uiLabelMap.AccountingPaymentAmount}" 
use-when="actualCurrency==false"><display type="currency" 
currency="${actualCurrencyUomId}"/></field>
         <field name="pmAmount" title="${uiLabelMap.AccountingPaymentAmount}" 
entry-name="pmActualCurrencyAmount" use-when="actualCurrency==true"><display 
type="currency" currency="${actualCurrencyUomId}"/></field>
-    </form>
-    <form name="ListUnAppliedInvoices" type="list" 
list-name="ListUnAppliedInvoices"
+    </grid>
+    
+    <grid name="ListUnAppliedInvoices" list-name="ListUnAppliedInvoices"
         default-title-style="tableheadtext" odd-row-style="alternate-row" 
default-table-style="basic-table hover-bar"
        >
         <actions>
@@ -1143,8 +1144,9 @@ under the License.
         <field name="invoiceDate"><display type="date"/></field>
         <field name="amount"><display type="currency" 
currency="${invoiceCurrencyUomId}"/></field>
         <field name="unAppliedAmount"><display type="currency" 
currency="${invoiceCurrencyUomId}"/></field>
-    </form>
-    <form name="ListUnAppliedPayments" type="list" list-name="paymentList"
+    </grid>
+    
+    <grid name="ListUnAppliedPayments" list-name="paymentList"
         default-title-style="tableheadtext" odd-row-style="alternate-row" 
default-table-style="basic-table hover-bar"
        >
         <actions>
@@ -1168,7 +1170,8 @@ under the License.
         </field>
         <field name="amount"><display type="currency" 
currency="${paymentCurrencyUomId}"/></field>
         <field name="unAppliedAmount"><display type="currency" 
currency="${paymentCurrencyUomId}"/></field>
-    </form>
+    </grid>
+    
     <form name="PartyFinancialSummary" type="single" title="Financial summary" 
default-map-name="finanSummary"
         default-title-style="tableheadtext">
         <actions>
@@ -1185,7 +1188,8 @@ under the License.
         <field position="1" name="totalToBePaid" 
use-when="finanSummary.get(&quot;totalToBePaid&quot;)!=null" 
title="${uiLabelMap.PartyToBeReceivedFrom} ${parameters.partyId}"><display 
type="currency" currency="${actualCurrencyUomId}"/></field>
         <field position="1" name="totalToBeReceived" 
use-when="finanSummary.get(&quot;totalToBeReceived&quot;)!=null" 
title="${uiLabelMap.PartyToBePaidTo} ${parameters.partyId}"><display 
type="currency" currency="${actualCurrencyUomId}"/></field>
     </form>
-    <form name="ViewPartyRoles" type="list" list-name="partyRoles" 
target="viewroles"
+    
+    <grid name="ViewPartyRoles" list-name="partyRoles" target="viewroles"
         default-title-style="tableheadtext"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <field name="roleTypeId" 
title="${uiLabelMap.PartyRoleTypeId}"><display/></field>
@@ -1197,7 +1201,8 @@ under the License.
                 <parameter param-name="roleTypeId"/>
             </hyperlink>
         </field>
-    </form>
+    </grid>
+    
     <form name="AddPartyRole" type="single" title="Add a role to party" 
target="addrole">
         <field name="partyId"><hidden value="${parameters.partyId}"/></field>
         <field name="roleTypeId">
@@ -1244,7 +1249,8 @@ under the License.
         <field name="description" title="${uiLabelMap.CommonDescription}" 
required-field="true"><text/></field>
         <field name="save" title="${uiLabelMap.CommonSave}"><submit/></field>
     </form>
-    <form name="ListPreference" type="list" target="removePreference" 
list-name="enumTypeChildAndEnums"
+    
+    <grid name="ListPreference" target="removePreference" 
list-name="enumTypeChildAndEnums"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar" separate-columns="true" use-row-submit="true" >
         <row-actions>
             <service service-name="getUserPreference" result-map="values">
@@ -1260,19 +1266,22 @@ under the License.
         <field name="userPrefUserLoginId"><hidden/></field>
         <field name="userPrefValue" 
title="${uiLabelMap.CommonValue}"><display/></field>
         <field name="submit" title="${uiLabelMap.CommonRemove}" 
use-when="userPrefValue!=null"><submit/></field>
-    </form>
-    <form name="PartyBillingAccount" type="list" list-name="billingAccounts" 
default-table-style="basic-table hover-bar">
+    </grid>
+    
+    <grid name="PartyBillingAccount" list-name="billingAccounts" 
default-table-style="basic-table hover-bar">
         <field name="billingAccountId"><display/></field>
         <field name="accountLimit"><display type="currency"/></field>
         <field name="accountBalance"><display type="currency"/></field>
         <field name="description"><display/></field>
-    </form>
-    <form name="PartyReturns" type="list" list-name="returnList" 
default-table-style="basic-table hover-bar">
+    </grid>
+    
+    <grid name="PartyReturns" list-name="returnList" 
default-table-style="basic-table hover-bar">
         <field name="returnId"><display/></field>
         <field name="statusId"><display-entity 
entity-name="StatusItem"/></field>
         <field name="fromPartyId"><display/></field>
         <field name="toPartyId"><display/></field>
-    </form>
+    </grid>
+    
     <form name="PartySalesOpportunities" type="list" 
list-name="salesOpportunities" default-table-style="basic-table hover-bar">
         <field name="opportunityName" title="${uiLabelMap.SfaOpportunityName}">
             <hyperlink description="${opportunityName} 
[${salesOpportunityId}]" target="ViewSalesOpportunity">
@@ -1284,7 +1293,7 @@ under the License.
         <field name="partyId"><display/></field>
     </form>
 
-    <form name="ListPartyIdentification" type="list" list-name="listIt"
+    <grid name="ListPartyIdentification" list-name="listIt"
                  default-table-style="basic-table hover-bar" 
target="EditPartyIdentification">
         <actions>
             <entity-and entity-name="PartyIdentificationAndParty" >
@@ -1302,7 +1311,7 @@ under the License.
              </hyperlink>
         </field>
         <field name="submit" title="${uiLabelMap.CommonUpdate}"><submit 
/></field>
-    </form>
+    </grid>
     
     <form name="EditPartyIdentification" type="single" list-name="partyIdents"
                  default-table-style="basic-table hover-bar" 
target="createPartyIdentification" focus-field-name="idValue">
@@ -1344,7 +1353,8 @@ under the License.
             </drop-down>
         </field>
     </form>
-    <form name="ListProductStoreRole" type="list" list-name="listIt" 
paginate-target="FindProductStoreRoles" default-entity-name="ProductStoreRole" 
separate-columns="true"
+    
+    <grid name="ListProductStoreRole" list-name="listIt" 
paginate-target="FindProductStoreRoles" default-entity-name="ProductStoreRole" 
separate-columns="true"
             odd-row-style="alternate-row" header-row-style="header-row-2" 
default-table-style="basic-table hover-bar">
         <actions>
             <service service-name="performFind" result-map="result" 
result-map-list="listIt">
@@ -1382,14 +1392,14 @@ under the License.
                 <parameter param-name="fromDate"/>
             </hyperlink>
         </field>
-    </form>
+    </grid>
 
     <form name="ExportParty" type="single" target="ExportPartyCsv.csv" 
title="" >
         <field name="partyId" tooltip="blank for all"><lookup 
target-form-name="LookupPartyName"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit 
button-type="button"/></field>
     </form>
 
-    <form name="ExportPartyCsv" list-name="listIt" target="" title="" 
type="list" view-size="99999"
+    <grid name="ExportPartyCsv" list-name="listIt" target="" title="" 
view-size="99999"
         odd-row-style="alternate-row" header-row-style="header-row-2" 
default-table-style="basic-table hover-bar" paginate="false">
         <actions>
             <entity-condition entity-name="PartyExport">
@@ -1426,7 +1436,7 @@ under the License.
         <field name="stateProvinceGeoId" 
title="stateProvinceGeoId"><display/></field>
         <field name="postalCode" title="postalCode"><display/></field>
         <field name="countryGeoId" title="countryGeoId"><display/></field>
-    </form>
+    </grid>
     
     <form name="ImportParty" type="upload" target="uploadParty" title="" >
         <field name="uploadedFile"><file/></field>

Modified: 
ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=1815193&r1=1815192&r2=1815193&view=diff
==============================================================================
--- 
ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyScreens.xml 
(original)
+++ 
ofbiz/ofbiz-framework/trunk/applications/party/widget/partymgr/PartyScreens.xml 
Tue Nov 14 09:44:57 2017
@@ -175,7 +175,7 @@ under the License.
                 <decorator-screen name="CommonPartyDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet title="${uiLabelMap.PartyMemberRoles}" 
navigation-form-name="ViewPartyRoles">
-                            <include-form name="ViewPartyRoles" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                            <include-grid name="ViewPartyRoles" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                         </screenlet>
                         <section>
                             <condition>
@@ -292,7 +292,7 @@ under the License.
                 <decorator-screen name="CommonPartyDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet title="${uiLabelMap.PartyRelationships}">
-                            <include-form name="ListPartyRelationships" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                            <include-grid name="ListPartyRelationships" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                         </screenlet>
                         <container style="lefthalf">
                         <section>
@@ -639,7 +639,7 @@ under the License.
                         <screenlet id="AddPartyRatesPanel" 
title="${uiLabelMap.PageTitleEditPartyRates}" collapsible="true">
                             <include-form name="AddPartyRate" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                         </screenlet>
-                        <include-form name="ListPartyRates" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                        <include-grid name="ListPartyRates" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
@@ -664,7 +664,7 @@ under the License.
                         <screenlet id="AddSegmentRolePanel" 
title="${uiLabelMap.PageTitleAddPartySegmentRoles}" collapsible="true">
                             <include-form name="AddSegmentRole" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                         </screenlet>
-                        <include-form name="ListSegmentRoles" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                        <include-grid name="ListSegmentRoles" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
@@ -875,7 +875,7 @@ under the License.
                             </link>
                         </container>
                         <screenlet title="${uiLabelMap.PageTitleListContent}">
-                            <include-form name="ListPartyContents" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                            <include-grid name="ListPartyContents" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                         </screenlet>
                         <screenlet 
title="${uiLabelMap.PageTitleAddPartyContent}">
                             <include-form name="AddPartyContent" 
location="component://party/widget/partymgr/PartyForms.xml"/>
@@ -992,7 +992,7 @@ under the License.
                                     </actions>
                                     <widgets>
                                         <screenlet 
title="${uiLabelMap.AccountingInvoicesApplPayments}" 
navigation-form-name="Invoices">
-                                            <include-form 
name="ListInvoicesApplPayments" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                                            <include-grid 
name="ListInvoicesApplPayments" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                                             <section>
                                                 <condition>
                                                     <and>
@@ -1021,7 +1021,7 @@ under the License.
                             </actions>
                             <widgets>
                                 <screenlet 
title="${uiLabelMap.PartyInvoicesNotApplied}" 
navigation-form-name="partyFinancialHistoryInvoicesN">
-                                    <include-form name="ListUnAppliedInvoices" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                                    <include-grid name="ListUnAppliedInvoices" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                                     <section>
                                         <condition>
                                             <and>
@@ -1048,7 +1048,7 @@ under the License.
                             </actions>
                             <widgets>
                                 <screenlet 
title="${uiLabelMap.PartyPaymentsNotApplied}" 
navigation-form-name="partyFinancialHistoryPaymentsN">
-                                    <include-form name="ListUnAppliedPayments" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                                    <include-grid name="ListUnAppliedPayments" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                                     <section>
                                         <condition>
                                             <and>
@@ -1101,7 +1101,7 @@ under the License.
                             </actions>
                             <widgets>
                                 <screenlet 
title="${uiLabelMap.AccountingBillingAccount}">
-                                    <include-form name="PartyBillingAccount" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                                    <include-grid name="PartyBillingAccount" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                                 </screenlet>
                             </widgets>
                         </section>
@@ -1113,7 +1113,7 @@ under the License.
                             </actions>
                             <widgets>
                                 <screenlet 
title="${uiLabelMap.OrderOrderReturns}">
-                                    <include-form name="PartyReturns" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                                    <include-grid name="PartyReturns" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                                 </screenlet>
                             </widgets>
                         </section>
@@ -1146,7 +1146,7 @@ under the License.
                                 </actions>
                                 <widgets>
                                     <screenlet 
title="${uiLabelMap.CommonPreferences} ${uiLabelMap.CommonFor} userLogin: 
${userPrefUserLoginId}" >
-                                        <include-form name="ListPreference" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                                        <include-grid name="ListPreference" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                                     </screenlet>
                                 </widgets>
                             </section>
@@ -1259,7 +1259,7 @@ under the License.
                 <decorator-screen name="CommonPartyDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <screenlet 
title="${uiLabelMap.PartyPartyIdentificationList}">
-                             <include-form name="ListPartyIdentification" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                             <include-grid name="ListPartyIdentification" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                         </screenlet>
                         <screenlet 
title="${uiLabelMap.PartyPartyIdentification}" 
navigation-menu-name="NewPartyIdentification" 
id="PartyIdentificationCreationPanel">
                              <include-menu name="NewPartyIdentification" 
location="component://party/widget/partymgr/PartyMenus.xml"/>
@@ -1292,7 +1292,7 @@ under the License.
                                 <include-form name="FindProductStoreRole" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                             </decorator-section>
                             <decorator-section name="search-results">
-                                <include-form name="ListProductStoreRole" 
location="component://party/widget/partymgr/PartyForms.xml"/>
+                                <include-grid name="ListProductStoreRole" 
location="component://party/widget/partymgr/PartyForms.xml"/>
                             </decorator-section>
                         </decorator-screen>
                     </decorator-section>
@@ -1366,7 +1366,7 @@ under the License.
                 <set field="organizationPartyId" 
from-field="parameters.organizationPartyId"/>
             </actions>
             <widgets>
-                <include-form name="ExportPartyCsv" 
location="component://party/widget/partymgr/PartyForms.xml"/>           
+                <include-grid name="ExportPartyCsv" 
location="component://party/widget/partymgr/PartyForms.xml"/>
             </widgets>
         </section>
     </screen>


Reply via email to