[OFBiz] SVN: r6716 - in trunk/framework: common/widget example/widget/example webtools/widget

jonesde@svn.ofbiz.org jonesde at svn.ofbiz.org
Sat Feb 11 14:01:09 CST 2006


Author: jonesde
Date: 2006-02-11 14:01:02 -0600 (Sat, 11 Feb 2006)
New Revision: 6716

Modified:
   trunk/framework/common/widget/CommonScreens.xml
   trunk/framework/example/widget/example/CommonScreens.xml
   trunk/framework/webtools/widget/CommonScreens.xml
Log:
Applied patch from Jacopo Cappellato to support Menu Widget appheaders and to use the common decorator for example and webtools

Modified: trunk/framework/common/widget/CommonScreens.xml
===================================================================
--- trunk/framework/common/widget/CommonScreens.xml	2006-02-11 12:40:24 UTC (rev 6715)
+++ trunk/framework/common/widget/CommonScreens.xml	2006-02-11 20:01:02 UTC (rev 6716)
@@ -73,9 +73,19 @@
                 <platform-specific><html><html-template location="component://common/webcommon/includes/appbar.ftl"/></html></platform-specific>
                 
                 <container style="centerarea">
-                    <!-- render appheader -->
-                    <platform-specific><html><html-template location="${appheaderTemplate}"/></html></platform-specific>
-                    
+                    <!-- render appheader: both menu widget style and ftl template style menus are supported-->
+                    <section>
+                        <condition>
+                            <if-empty field-name="applicationMenuName"/>
+                        </condition>
+                        <widgets>
+                            <platform-specific><html><html-template location="${appheaderTemplate}"/></html></platform-specific>
+                        </widgets>
+                        <fail-widgets>
+                            <label style="apptitle">${applicationTitle}</label>
+                            <include-menu name="${applicationMenuName}" location="${applicationMenuLocation}"/>
+                        </fail-widgets>
+                    </section>
                     <container style="contentarea">
                         <container id="column-container">
                             <!-- by default will render left-bar only if leftbarScreen value not empty -->

Modified: trunk/framework/example/widget/example/CommonScreens.xml
===================================================================
--- trunk/framework/example/widget/example/CommonScreens.xml	2006-02-11 12:40:24 UTC (rev 6715)
+++ trunk/framework/example/widget/example/CommonScreens.xml	2006-02-11 20:01:02 UTC (rev 6716)
@@ -38,28 +38,10 @@
                 <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
                 <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
                 <set field="activeApp" value="example" global="true"/>
+                <set field="appheaderTemplate" value="component://example/webapp/example/includes/appheader.ftl" global="true"/>
             </actions>
             <widgets>
-                <!-- render header -->
-                <platform-specific><html><html-template location="component://common/webcommon/includes/header.ftl"/></html></platform-specific>
-                <!-- render appbar -->
-                <platform-specific><html><html-template location="component://common/webcommon/includes/appbar.ftl"/></html></platform-specific>
-                
-                <container style="centerarea">
-                    <!-- render appheader -->
-                    <platform-specific><html><html-template location="component://example/webapp/example/includes/appheader.ftl"/></html></platform-specific>
-                    
-                    <container style="contentarea">
-                        <container style="column-main">
-                            <!-- render messages -->
-                            <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific>
-                            <decorator-section-include name="body"/>
-                        </container>
-                    </container>
-                </container>
-                
-                <!-- render footer -->
-                <platform-specific><html><html-template location="component://common/webcommon/includes/footer.ftl"/></html></platform-specific>
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
             </widgets>
         </section>
     </screen>

Modified: trunk/framework/webtools/widget/CommonScreens.xml
===================================================================
--- trunk/framework/webtools/widget/CommonScreens.xml	2006-02-11 12:40:24 UTC (rev 6715)
+++ trunk/framework/webtools/widget/CommonScreens.xml	2006-02-11 20:01:02 UTC (rev 6716)
@@ -38,31 +38,10 @@
                 <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
                 <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
                 <set field="activeApp" value="webtools" global="true"/>
+                <set field="appheaderTemplate" value="component://webtools/webapp/webtools/includes/appheader.ftl" global="true"/>
             </actions>
             <widgets>
-                <!-- render header -->
-                <platform-specific><html><html-template location="component://common/webcommon/includes/header.ftl"/></html></platform-specific>
-                <!-- render appbar -->
-                <platform-specific><html><html-template location="component://common/webcommon/includes/appbar.ftl"/></html></platform-specific>
-                
-                <container style="centerarea">
-                    <!-- render appheader -->
-                    <platform-specific><html><html-template location="component://webtools/webapp/webtools/includes/appheader.ftl"/></html></platform-specific>
-                    
-                    <container style="contentarea">
-                        <!-- by default will render left-bar only if leftbarScreen value not empty -->
-                        <!-- include-screen name="${leftbarScreenName}" location="${leftbarScreenLocation}"/ -->
-                    
-                        <container style="column-main">
-                            <!-- render messages -->
-                            <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific>
-                            <decorator-section-include name="body"/>
-                        </container>
-                    </container>
-                </container>
-                
-                <!-- render footer -->
-                <platform-specific><html><html-template location="component://common/webcommon/includes/footer.ftl"/></html></platform-specific>
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
             </widgets>
         </section>
     </screen>



More information about the Svn mailing list