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:24 UTC

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

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>