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

commit c78c1f10e37170f32045a7d826a53bff73acc8ec
Author: Pierre Smits <pierre.sm...@orrtiz.com>
AuthorDate: Fri Jan 21 11:52:25 2022 +0100

    Improved: List and Grid (OFBIZ-11345) (#461)
    
    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:
    EmployeeForms.xml: from form definition with list ref to grid definition 
with list ref, additional clean-up
    EmployeeScreens.xml: from form ref to grid ref , additional cleanup
---
 applications/humanres/widget/EmployeeScreens.xml   | 16 +++++++++---
 .../humanres/widget/forms/EmployeeForms.xml        | 30 +++++++++++-----------
 2 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/applications/humanres/widget/EmployeeScreens.xml 
b/applications/humanres/widget/EmployeeScreens.xml
index 7b6530f..062b6f6 100644
--- a/applications/humanres/widget/EmployeeScreens.xml
+++ b/applications/humanres/widget/EmployeeScreens.xml
@@ -175,7 +175,9 @@ under the License.
             <widgets>
                 <decorator-screen name="EmployeeDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <include-form name="ListEmployeeSkills" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                        <screenlet>
+                            <include-grid name="ListEmployeeSkills" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                        </screenlet>
                         <screenlet id="AddPartySkillPanel" 
title="${uiLabelMap.HumanResAddPartySkill}" collapsible="true">
                             <include-form name="AddEmployeeSkills" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
                         </screenlet>
@@ -198,6 +200,9 @@ under the License.
             <widgets>
                 <decorator-screen name="EmployeeDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
+                        <screenlet>
+                            <include-grid name="ListEmployeeQualification" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                        </screenlet>
                         <include-form name="ListEmployeeQualification" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
                         <screenlet id="AddPartyQualPanel" 
title="${uiLabelMap.HumanResAddPartyQual}" collapsible="true">
                             <include-form name="AddEmployeeQualification" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
@@ -297,7 +302,9 @@ under the License.
             <widgets>
                 <decorator-screen name="EmployeeDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <include-form name="ListEmplLeaves" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                        <screenlet>
+                            <include-form name="ListEmplLeaves" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                        </screenlet>
                         <screenlet id="AddEmplLeavePanel" 
title="${uiLabelMap.HumanResAddEmplLeave}" collapsible="true">
                             <include-form name="AddEmplLeave" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
                         </screenlet>
@@ -348,13 +355,14 @@ under the License.
             <widgets>
                 <decorator-screen name="EmployeeDecorator" 
location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <include-form name="PayrollHistoryList" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                        <screenlet>
+                            <include-grid name="PayrollHistoryList" 
location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                        </screenlet>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
-
     <screen name="MyLeaveList">
         <section>
             <actions>
diff --git a/applications/humanres/widget/forms/EmployeeForms.xml 
b/applications/humanres/widget/forms/EmployeeForms.xml
index 3ef981a..9e1a31f 100644
--- a/applications/humanres/widget/forms/EmployeeForms.xml
+++ b/applications/humanres/widget/forms/EmployeeForms.xml
@@ -80,7 +80,7 @@
         <field name="skillLevel"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" 
widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="ListEmployeeSkills" type="list" list-name="listIt" 
use-row-submit="true" separate-columns="true" target="updateEmployeeSkill" 
paginate-target="findPartySkills"
+    <grid name="ListEmployeeSkills" list-name="listIt" use-row-submit="true" 
separate-columns="true" target="updateEmployeeSkill" 
paginate-target="findPartySkills"
         odd-row-style="alternate-row" header-row-style="header-row-2" 
default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="PartySkill">
@@ -89,7 +89,7 @@
             </entity-condition>
         </actions>
         <auto-fields-service default-field-type="hidden" 
service-name="updatePartySkill"/>
-        <field name="skillTypeId">
+        <field name="skillTypeId" title="${uiLabelMap.CommonType}">
             <display-entity entity-name="SkillType"/>
         </field>
         <field name="yearsExperience"><text/></field>
@@ -102,7 +102,7 @@
             </hyperlink>
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit 
button-type="button"/></field>
-    </form>
+    </grid>
     <form name="AddEmployeeQualification" type="single" 
target="createEmployeeQualification">
         <auto-fields-service service-name="createPartyQual"/>
         <field name="partyId"><hidden/></field>
@@ -131,7 +131,7 @@
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" 
widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="ListEmployeeQualification" type="list" list-name="listIt" 
use-row-submit="true" separate-columns="true" 
target="updateEmployeeQualification" paginate-target="FindPartyQuals"
+    <grid name="ListEmployeeQualification" list-name="listIt" 
use-row-submit="true" separate-columns="true" 
target="updateEmployeeQualification" paginate-target="FindPartyQuals"
             odd-row-style="alternate-row" header-row-style="header-row-2" 
default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="PartyQual">
@@ -141,11 +141,11 @@
         </actions>
         <auto-fields-service service-name="updatePartyQual"/>
         <field name="partyId"><hidden/></field>
-        <field name="partyQualTypeId"><display-entity 
entity-name="PartyQualType"/></field>
-        <field name="fromDate"><display/></field>
-        <field name="qualificationDesc"><text/></field>
+        <field name="partyQualTypeId" 
title="${uiLabelMap.CommonType}"><display-entity 
entity-name="PartyQualType"/></field>
+        <field name="fromDate" 
title="${uiLabelMap.CommonFrom}"><display/></field>
+        <field name="qualificationDesc" 
title="${uiLabelMap.CommonDescription}"><text/></field>
         <field name="title"><text/></field>
-        <field name="statusId">
+        <field name="statusId" title="${uiLabelMap.CommonStatus}">
             <drop-down allow-empty="true">
                 <entity-options key-field-name="statusId" 
entity-name="StatusItem">
                     <entity-constraint name="statusTypeId" operator="equals" 
value="PARTY_INV_STATUS"/>
@@ -170,7 +170,7 @@
             </hyperlink>
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}" 
widget-style="smallSubmit"><submit/></field>
-    </form>
+    </grid>
     <form name="AddEmployeeTraining" type="single" 
target="createEmployeeTraining">
         <field name="partyId"><hidden/></field>
         <field name="trainingClassTypeId" required-field="true">
@@ -203,7 +203,7 @@
         <field name="approverPartyId" required-field="true"><lookup 
target-form-name="LookupPartyName"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" 
widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="ListEmplLeaves" type="list" list-name="listIt" 
separate-columns="true" target="updateEmplLeave" 
paginate-target="FindEmplLeaves"
+    <grid name="ListEmplLeaves" list-name="listIt" separate-columns="true" 
target="updateEmplLeave" paginate-target="FindEmplLeaves"
         odd-row-style="alternate-row" header-row-style="header-row-2" 
default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="EmplLeave">
@@ -216,10 +216,10 @@
         <field name="approverPartyId"><lookup 
target-form-name="LookupPartyName"/></field>
         <field name="leaveStatus"><display-entity entity-name="StatusItem" 
key-field-name="statusId"/></field>
         <field name="emplLeaveReasonTypeId"><display/></field>
-        <field name="leaveTypeId"><display-entity 
entity-name="EmplLeaveType"/></field>
-        <field name="fromDate"></field>
+        <field name="leaveTypeId" 
title="${uiLabelMap.CommonType}"><display-entity 
entity-name="EmplLeaveType"/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonGrom}"></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit 
button-type="button"/></field>
-    </form>
+    </grid>
     <form name="CurrentEmploymentData" default-map-name="employmentData" 
type="single">
         <field name="company" entry-name="employment.partyIdFrom">
             <display-entity entity-name="PartyNameView" 
key-field-name="partyId" description="${groupName} ">
@@ -237,12 +237,12 @@
             <display type="currency" 
currency="${employmentData.emplPositionRateAmount.rateCurrencyUomId}"/>
         </field>
     </form>
-    <form name="PayrollHistoryList" type="list" list-name="payroll" 
extends="ListInvoices" 
extends-resource="component://accounting/widget/InvoiceForms.xml" 
paginate-target="PayrollHistory">
+    <grid name="PayrollHistoryList" list-name="payroll" extends="ListInvoices" 
extends-resource="component://accounting/widget/InvoiceForms.xml" 
paginate-target="PayrollHistory">
         <field name="invoiceId" widget-style="buttontext" sort-field="true">
             <hyperlink description="${invoiceId}" 
target="/accounting/control/invoiceOverview" target-type="inter-app">
                 <parameter param-name="invoiceId"/>
             </hyperlink>
         </field>
-    </form>
+    </grid>
 </forms>
 

Reply via email to