You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2021/07/07 09:30:21 UTC

[ofbiz-framework] branch trunk updated (dbaed18 -> 20d99d5)

This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git.


    from dbaed18  Improved: Cleaned commented code from entity component (OFBIZ-8038) (#308)
     new 3770cdb  Implemented: Keep paginate list query on dynamic refresh (OFBIZ-12261)
     new d795fd4  Fixed: List parameters forwarded by element callback failed to restore the list (OFBIZ-11812) (OFBIZ-12261)
     new 20d99d5  Improved: Globalize the refresh on FindScreenDecorator (OFBIZ-11812) (OFBIZ-12261)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 framework/common/widget/CommonForms.xml            |  5 ++-
 .../org/apache/ofbiz/widget/model/ModelForm.java   |  2 +-
 themes/common-theme/widget/CommonForms.xml         |  3 ++
 themes/common-theme/widget/CommonScreens.xml       | 50 +++++++++++-----------
 themes/common-theme/widget/Theme.xml               |  2 +
 5 files changed, 36 insertions(+), 26 deletions(-)

[ofbiz-framework] 03/03: Improved: Globalize the refresh on FindScreenDecorator (OFBIZ-11812) (OFBIZ-12261)

Posted by nm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 20d99d58ab7398bb49142329b1bac6fd1e21dedd
Author: Nicolas Malin <ni...@nereide.fr>
AuthorDate: Wed Jul 7 10:50:51 2021 +0200

    Improved: Globalize the refresh on FindScreenDecorator (OFBIZ-11812) (OFBIZ-12261)
    
    If you use a ComomnDynamicSingle form for realize a search, the FindScreenDecorator would be refresh all the container searchOptions + searchResult.
    
    To keep the coherence, we move the screenStack resolution on the beginning of the decorator, and leave the searchResult to resolve it itself by usage of EmbeddedDecorator.
    
    In practice to keep all dynamism on a search element :
      * Main screen with global decorator include the find screen wrap by main-decorator
      * The find screen include the search form and include the screen list result wrap by FindScreenDecorator
      * The screen result include the list result form wrap by EmbeddedDecorator
---
 themes/common-theme/widget/CommonScreens.xml | 50 +++++++++++++++-------------
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/themes/common-theme/widget/CommonScreens.xml b/themes/common-theme/widget/CommonScreens.xml
index 1a6a1f5..4c1a865 100644
--- a/themes/common-theme/widget/CommonScreens.xml
+++ b/themes/common-theme/widget/CommonScreens.xml
@@ -666,30 +666,32 @@ under the License.
     <screen name="FindScreenDecorator">
         <section>
             <widgets>
-                <section>
-                    <condition>
-                        <if-empty field="titleProperty"/>
-                    </condition>
-                    <widgets>
-                        <container style="page-title"><label text="${title}"></label></container>
-                    </widgets>
-                    <fail-widgets>
-                        <container style="page-title"><label text="${uiLabelMap[titleProperty]}"></label></container>
-                    </fail-widgets>
-                </section>
-                <decorator-section-include name="menu-bar"/>
-                <container style="clear"/>
-                <screenlet id="searchOptions" name="findScreenlet" collapsible="true" title="${uiLabelMap.CommonSearchOptions}">
-                    <container id="search-options">
-                        <decorator-section-include name="search-options" />
-                    </container>
-                </screenlet>
-                <screenlet padded="false">
-                    <label style="h3" text="${uiLabelMap.CommonSearchResults}"/>
-                    <container id="${screen:id(screenStack)}">
-                        <decorator-section-include name="search-results"/>
-                    </container>
-                </screenlet>
+                <container id="${screen:id(screenStack)}">
+                    <section>
+                        <condition>
+                            <if-empty field="titleProperty"/>
+                        </condition>
+                        <widgets>
+                            <container style="page-title"><label text="${title}"></label></container>
+                        </widgets>
+                        <fail-widgets>
+                            <container style="page-title"><label text="${uiLabelMap[titleProperty]}"></label></container>
+                        </fail-widgets>
+                    </section>
+                    <decorator-section-include name="menu-bar"/>
+                    <container style="clear"/>
+                    <screenlet id="searchOptions" name="findScreenlet" collapsible="true" title="${uiLabelMap.CommonSearchOptions}">
+                        <container id="search-options">
+                            <decorator-section-include name="search-options" />
+                        </container>
+                    </screenlet>
+                    <screenlet padded="false">
+                        <label style="h3" text="${uiLabelMap.CommonSearchResults}"/>
+                        <container id="search-results">
+                            <decorator-section-include name="search-results"/>
+                        </container>
+                    </screenlet>
+                </container>
             </widgets>
         </section>
     </screen>

[ofbiz-framework] 02/03: Fixed: List parameters forwarded by element callback failed to restore the list (OFBIZ-11812) (OFBIZ-12261)

Posted by nm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit d795fd45beb0a9a17392be76b52a99425768e497
Author: Nicolas Malin <ni...@nereide.fr>
AuthorDate: Wed Jul 7 10:17:36 2021 +0200

    Fixed: List parameters forwarded by element callback failed to restore the list (OFBIZ-11812) (OFBIZ-12261)
    
    There is an error when the callback element resolve the list parameters, it check the parameters element as field and not as final variable.
    
    This generate an empty callback link.
---
 .../widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java
index 1121fb8..3f53cc6 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelForm.java
@@ -2531,7 +2531,7 @@ public abstract class ModelForm extends ModelWidget {
                     parameters != null
                             ? parameters.entrySet()
                             .stream()
-                            .map(entry -> new CommonWidgetModels.Parameter(entry.getKey(), (String) entry.getValue(), true))
+                            .map(entry -> new CommonWidgetModels.Parameter(entry.getKey(), (String) entry.getValue(), false))
                             .collect(Collectors.toList())
                             : new ArrayList<>());
         }

[ofbiz-framework] 01/03: Implemented: Keep paginate list query on dynamic refresh (OFBIZ-12261)

Posted by nm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git

commit 3770cdbb383204b33fd070b8de67a982d83c4f00
Author: Nicolas Malin <ni...@nereide.fr>
AuthorDate: Wed Jul 7 10:10:27 2021 +0200

    Implemented: Keep paginate list query on dynamic refresh (OFBIZ-12261)
    
    Complete previous commit with adding CommonDynamicGrid and CommonDynamicSingle form on common-theme previously forgot
---
 framework/common/widget/CommonForms.xml    | 5 ++++-
 themes/common-theme/widget/CommonForms.xml | 3 +++
 themes/common-theme/widget/Theme.xml       | 2 ++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/framework/common/widget/CommonForms.xml b/framework/common/widget/CommonForms.xml
index 9d5bd30..8a732ad 100644
--- a/framework/common/widget/CommonForms.xml
+++ b/framework/common/widget/CommonForms.xml
@@ -25,6 +25,8 @@ under the License.
     commonFormLocations.CommonSimpleGrid ?: 'component://common-theme/widget/CommonForms.xml'}"/>
     <grid name="CommonBasicGrid" extends="CommonBasicGrid" extends-resource="${groovy:
     commonFormLocations.CommonBasicGrid ?: 'component://common-theme/widget/CommonForms.xml'}"/>
+    <grid name="CommonDynamicGrid" extends="CommonDynamicGrid" extends-resource="${groovy:
+    commonFormLocations.CommonDynamicGrid ?: 'component://common-theme/widget/CommonForms.xml'}"/>
 
     <form name="CommonSimpleList" extends="CommonSimpleList" extends-resource="${groovy:
     commonFormLocations.CommonSimpleList ?: 'component://common-theme/widget/CommonForms.xml'}"/>
@@ -35,6 +37,7 @@ under the License.
 
     <form name="CommonBasicSingle" extends="CommonBasicSingle" extends-resource="${groovy:
     commonFormLocations.CommonBasicSingle ?: 'component://common-theme/widget/CommonForms.xml'}"/>
-
+    <form name="CommonDynamicSingle" extends="CommonDynamicSingle" extends-resource="${groovy:
+    commonFormLocations.CommonDynamicSingle ?: 'component://common-theme/widget/CommonForms.xml'}"/>
 
 </forms>
diff --git a/themes/common-theme/widget/CommonForms.xml b/themes/common-theme/widget/CommonForms.xml
index b6bb24a..361b0eb 100644
--- a/themes/common-theme/widget/CommonForms.xml
+++ b/themes/common-theme/widget/CommonForms.xml
@@ -44,5 +44,8 @@ under the License.
           odd-row-style="alternate-row" header-row-style="header-row-2" separate-columns="true"/>
 
     <form name="CommonBasicSingle" type="single"/>
+    <form name="CommonDynamicSingle" type="single">
+        <on-event-update-area event-type="submit"/>
+    </form>
 
 </forms>
diff --git a/themes/common-theme/widget/Theme.xml b/themes/common-theme/widget/Theme.xml
index fd7b726..58155a4 100644
--- a/themes/common-theme/widget/Theme.xml
+++ b/themes/common-theme/widget/Theme.xml
@@ -161,11 +161,13 @@ under the License.
         <root-decorator default-location="component://common-theme/widget/CommonForms.xml">
             <form name="CommonSimpleGrid"/>
             <form name="CommonBasicGrid"/>
+            <form name="CommonDynamicGrid"/>
             <form name="CommonSimpleList"/>
             <form name="CommonBasicList"/>
             <form name="CommonDynamicList"/>
             <form name="CommonInLineEditList"/>
             <form name="CommonBasicSingle"/>
+            <form name="CommonDynamicSingle"/>
         </root-decorator>
     </common-forms>
     <common-menus><!--list all common menu to each application that each theme can be surcharge or not and use the menu present on common theme-->