Author: jleroux
Date: Sat Sep 17 13:43:16 2016
New Revision: 1761235

URL: http://svn.apache.org/viewvc?rev=1761235&view=rev
Log:
Fixes: jquery.jgrowl.min.css is linked twice in html page
(OFBIZ-7758)

I am running on trunk rev 1751489 on tomahawk theme. 
In the browser, right-click and view the page source. 
There is duplicate linking of jquery.jgrowl.min.css i.e.

<link rel="stylesheet" 
href="/images/jquery/plugins/jquery-jgrowl/1.4.1/jquery.jgrowl.min.css" 
type="text/css"/>

The solution is to remove a hack for JPublish in fex Java classes 
and related changes (mostly "page." in ftl and xml files)

Thanks: Rohit Koushal for the path and James Yong the report

Modified:
    ofbiz/trunk/framework/common/template/includes/Simple.ftl
    ofbiz/trunk/framework/common/widget/PortalPageScreens.xml
    ofbiz/trunk/framework/webtools/widget/Menus.xml
    
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java
    
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
    
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java
    
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java
    ofbiz/trunk/specialpurpose/ecommerce/template/content/MiniPoll.ftl
    ofbiz/trunk/specialpurpose/ecommerce/template/content/ShowContentTree.ftl
    ofbiz/trunk/themes/bizznesstime/template/Header.ftl
    ofbiz/trunk/themes/bluelight/template/AppBarClose.ftl
    ofbiz/trunk/themes/bluelight/template/Header.ftl
    ofbiz/trunk/themes/droppingcrumbs/template/Header.ftl
    ofbiz/trunk/themes/flatgrey/template/Header.ftl
    ofbiz/trunk/themes/rainbowstone/template/includes/Header.ftl
    ofbiz/trunk/themes/tomahawk/template/Header.ftl

Modified: ofbiz/trunk/framework/common/template/includes/Simple.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/Simple.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/template/includes/Simple.ftl (original)
+++ ofbiz/trunk/framework/common/template/includes/Simple.ftl Sat Sep 17 
13:43:16 2016
@@ -27,7 +27,7 @@ under the License.
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
     <title>${layoutSettings.companyName!}
-        : <#if 
(page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)!}</#if></title>
+        : <#if 
(titleProperty)?has_content>${uiLabelMap[titleProperty]}<#else>${title!}</#if></title>
     <#if layoutSettings.shortcutIcon?has_content>
       <link rel="shortcut icon" 
href="<@ofbizContentUrl>${layoutSettings.shortcutIcon}</@ofbizContentUrl>"/>
     </#if>

Modified: ofbiz/trunk/framework/common/widget/PortalPageScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageScreens.xml?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/PortalPageScreens.xml (original)
+++ ofbiz/trunk/framework/common/widget/PortalPageScreens.xml Sat Sep 17 
13:43:16 2016
@@ -73,7 +73,7 @@ under the License.
                 <set field="layoutSettings.javaScripts[]" 
value="/images/myportal.js" global="true"/>
                 <set field="layoutSettings.styleSheets[+0]" 
value="/images/myportal.css" global="true"/>
                 <entity-one entity-name="PortalPage" value-field="portalPage"/>
-                <set field="page.title" 
from-field="portalPage.portalPageName"/>
+                <set field="title" from-field="portalPage.portalPageName"/>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" 
location="${parameters.mainDecoratorLocation}">

Modified: ofbiz/trunk/framework/webtools/widget/Menus.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/Menus.xml?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/widget/Menus.xml (original)
+++ ofbiz/trunk/framework/webtools/widget/Menus.xml Sat Sep 17 13:43:16 2016
@@ -60,7 +60,7 @@ under the License.
     </menu>
 
     <menu name="ConfigurationTabBar" extends="CommonTabBarMenu" 
extends-resource="component://common/widget/CommonMenus.xml"
-          selected-menuitem-context-field-name="page.tabButtonItem">
+          selected-menuitem-context-field-name="tabButtonItem">
         <menu-item name="tempexpr" 
title="${uiLabelMap.WebtoolsTemporalExpression}">
             <link target="findTemporalExpression"/>
         </menu-item>
@@ -70,7 +70,7 @@ under the License.
     </menu>
 
     <menu name="ImportExportTabBar" extends="CommonTabBarMenu" 
extends-resource="component://common/widget/CommonMenus.xml"
-          selected-menuitem-context-field-name="page.tabButtonItem">
+          selected-menuitem-context-field-name="tabButtonItem">
         <menu-item name="data" title="${uiLabelMap.WebtoolsDataFileTools}">
             <link target="viewdatafile"/>
         </menu-item>
@@ -101,7 +101,7 @@ under the License.
     </menu>
     
     <menu name="ServiceTabBar" extends="CommonTabBarMenu" 
extends-resource="component://common/widget/CommonMenus.xml"
-          selected-menuitem-context-field-name="page.tabButtonItem">
+          selected-menuitem-context-field-name="tabButtonItem">
         <menu-item name="serviceList" 
title="${uiLabelMap.WebtoolsServiceReference}">
             <link target="ServiceList"/>
         </menu-item>

Modified: 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java
 (original)
+++ 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/cache/WidgetContextCacheKey.java
 Sat Sep 17 13:43:16 2016
@@ -52,7 +52,6 @@ public final class WidgetContextCacheKey
         fieldNamesToSkip.add("requestAttributes");
         fieldNamesToSkip.add("JspTaglibs");
         fieldNamesToSkip.add("requestParameters");
-        fieldNamesToSkip.add("page");
         fieldNamesToSkip.add("controlPath");
         fieldNamesToSkip.add("contextRoot");
         fieldNamesToSkip.add("serverRoot");

Modified: 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
 (original)
+++ 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/AbstractModelAction.java
 Sat Sep 17 13:43:16 2016
@@ -910,11 +910,6 @@ public abstract class AbstractModelActio
                     this.field.put(context, newValue);
                 }
             }
-            // this is a hack for backward compatibility with the JPublish 
page object
-            Map<String, Object> page = 
UtilGenerics.checkMap(context.get("page"));
-            if (page != null) {
-                this.field.put(page, newValue);
-            }
         }
 
         public FlexibleStringExpander getDefaultExdr() {

Modified: 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java
 (original)
+++ 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ModelMenuAction.java
 Sat Sep 17 13:43:16 2016
@@ -181,12 +181,6 @@ public abstract class ModelMenuAction {
                     this.field.put(globalCtx, newValue);
                 }
             }
-
-            // this is a hack for backward compatibility with the JPublish 
page object
-            Map<String, Object> page = 
UtilGenerics.checkMap(context.get("page"));
-            if (page != null) {
-                this.field.put(page, newValue);
-            }
         }
 
         @Override

Modified: 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java
 (original)
+++ 
ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/ScreenRenderer.java
 Sat Sep 17 13:43:16 2016
@@ -252,9 +252,6 @@ public class ScreenRenderer {
         context.put("Application", ftlServletContext);
         context.put("Request", context.get("requestAttributes"));
  
-        // this is a dummy object to stand-in for the JPublish page object for 
backward compatibility
-        context.put("page", new HashMap());
-
         // some information from/about the ControlServlet environment
         context.put("controlPath", request.getAttribute("_CONTROL_PATH_"));
         context.put("contextRoot", request.getAttribute("_CONTEXT_ROOT_"));

Modified: ofbiz/trunk/specialpurpose/ecommerce/template/content/MiniPoll.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/content/MiniPoll.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/template/content/MiniPoll.ftl 
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/template/content/MiniPoll.ftl Sat Sep 
17 13:43:16 2016
@@ -17,7 +17,7 @@ specific language governing permissions
 under the License.
 -->
 
-<#assign groupName = page.randomSurveyGroup!>
+<#assign groupName = randomSurveyGroup!>
 <#if groupName?has_content>
   <#assign randomSurvey = 
Static["org.apache.ofbiz.product.store.ProductStoreWorker"]
       .getRandomSurveyWrapper(request, "testSurveyGroup")!>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/template/content/ShowContentTree.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/template/content/ShowContentTree.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/template/content/ShowContentTree.ftl 
(original)
+++ ofbiz/trunk/specialpurpose/ecommerce/template/content/ShowContentTree.ftl 
Sat Sep 17 13:43:16 2016
@@ -66,7 +66,7 @@ under the License.
 
   <#local contentIdx = contentId! />
   <#if (!contentIdx?? || contentIdx?length == 0)>
-    <#local contentIdx = page.contentIdx! />
+    <#local contentIdx = contentIdx! />
     <#if (!contentIdx?? || contentIdx?length == 0)>
     </#if>
   </#if>

Modified: ofbiz/trunk/themes/bizznesstime/template/Header.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/template/Header.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/template/Header.ftl (original)
+++ ofbiz/trunk/themes/bizznesstime/template/Header.ftl Sat Sep 17 13:43:16 2016
@@ -33,7 +33,7 @@ under the License.
     <meta http-equiv="expires" content="0" />
     <meta http-equiv="imagetoolbar" content="false" />
 
-    <title>${layoutSettings.companyName}: <#if 
(page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)!}</#if></title>
+    <title>${layoutSettings.companyName} : <#if 
(titleProperty)?has_content>${uiLabelMap[titleProperty]}<#else>${title!}</#if></title>
 
     <meta name="robots" content="index, follow" />
     <meta name="googlebot" content="index,follow" />

Modified: ofbiz/trunk/themes/bluelight/template/AppBarClose.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/template/AppBarClose.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/template/AppBarClose.ftl (original)
+++ ofbiz/trunk/themes/bluelight/template/AppBarClose.ftl Sat Sep 17 13:43:16 
2016
@@ -21,7 +21,7 @@ under the License.
   <div class="breadcrumbs-sep">
     <#if titleProperty??>
         ${uiLabelMap[titleProperty]}
-    <#else>${(page.title)!}
+    <#else>${title!}
     </#if>
   </div>
   <div class="breadcrumbs-end">

Modified: ofbiz/trunk/themes/bluelight/template/Header.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/template/Header.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/themes/bluelight/template/Header.ftl (original)
+++ ofbiz/trunk/themes/bluelight/template/Header.ftl Sat Sep 17 13:43:16 2016
@@ -28,7 +28,7 @@ under the License.
 <html lang="${docLangAttr}" dir="${langDir}" 
xmlns="http://www.w3.org/1999/xhtml";>
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title>${layoutSettings.companyName}: <#if 
(page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)!}</#if></title>
+    <title>${layoutSettings.companyName}: <#if 
(titleProperty)?has_content>${uiLabelMap[titleProperty]}<#else>${title!}</#if></title>
     <#if layoutSettings.shortcutIcon?has_content>
       <#assign shortcutIcon = layoutSettings.shortcutIcon/>
     <#elseif layoutSettings.VT_SHORTCUT_ICON?has_content>

Modified: ofbiz/trunk/themes/droppingcrumbs/template/Header.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/template/Header.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/themes/droppingcrumbs/template/Header.ftl (original)
+++ ofbiz/trunk/themes/droppingcrumbs/template/Header.ftl Sat Sep 17 13:43:16 
2016
@@ -28,7 +28,7 @@ under the License.
 <html lang="${docLangAttr}" dir="${langDir}" 
xmlns="http://www.w3.org/1999/xhtml";>
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title>${layoutSettings.companyName}: <#if 
(page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)!}</#if></title>
+    <title>${layoutSettings.companyName}: <#if 
(titleProperty)?has_content>${uiLabelMap[titleProperty]}<#else>${title!}</#if></title>
     <#if layoutSettings.shortcutIcon?has_content>
       <#assign shortcutIcon = layoutSettings.shortcutIcon/>
     <#elseif layoutSettings.VT_SHORTCUT_ICON?has_content>

Modified: ofbiz/trunk/themes/flatgrey/template/Header.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/template/Header.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/themes/flatgrey/template/Header.ftl (original)
+++ ofbiz/trunk/themes/flatgrey/template/Header.ftl Sat Sep 17 13:43:16 2016
@@ -24,7 +24,7 @@ under the License.
 <html lang="${docLangAttr}" dir="${langDir}" 
xmlns="http://www.w3.org/1999/xhtml";>
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title>${layoutSettings.companyName}: <#if 
(page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)!}</#if></title>
+    <title>${layoutSettings.companyName}: <#if 
(titleProperty)?has_content>${uiLabelMap[titleProperty]}<#else>${title!}</#if></title>
     <#if layoutSettings.shortcutIcon?has_content>
       <#assign shortcutIcon = layoutSettings.shortcutIcon/>
     <#elseif layoutSettings.VT_SHORTCUT_ICON?has_content>

Modified: ofbiz/trunk/themes/rainbowstone/template/includes/Header.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/themes/rainbowstone/template/includes/Header.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/themes/rainbowstone/template/includes/Header.ftl (original)
+++ ofbiz/trunk/themes/rainbowstone/template/includes/Header.ftl Sat Sep 17 
13:43:16 2016
@@ -24,7 +24,7 @@ under the License.
 <html lang="${docLangAttr}" dir="${langDir}" 
xmlns="http://www.w3.org/1999/xhtml";>
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title>${layoutSettings.companyName}: <#if 
(page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)!}</#if></title>
+    <title>${layoutSettings.companyName}: <#if 
(titleProperty)?has_content>${uiLabelMap[titleProperty]}<#else>${title!}</#if></title>
 <#if layoutSettings.shortcutIcon?has_content>
     <#assign shortcutIcon = layoutSettings.shortcutIcon/>
 <#elseif layoutSettings.VT_SHORTCUT_ICON?has_content>

Modified: ofbiz/trunk/themes/tomahawk/template/Header.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/template/Header.ftl?rev=1761235&r1=1761234&r2=1761235&view=diff
==============================================================================
--- ofbiz/trunk/themes/tomahawk/template/Header.ftl (original)
+++ ofbiz/trunk/themes/tomahawk/template/Header.ftl Sat Sep 17 13:43:16 2016
@@ -28,7 +28,7 @@ under the License.
 <html lang="${docLangAttr}" dir="${langDir}" 
xmlns="http://www.w3.org/1999/xhtml";>
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-    <title>${layoutSettings.companyName}: <#if 
(page.titleProperty)?has_content>${uiLabelMap[page.titleProperty]}<#else>${(page.title)!}</#if></title>
+    <title>${layoutSettings.companyName}: <#if 
(titleProperty)?has_content>${uiLabelMap[titleProperty]}<#else>${title!}</#if></title>
     <#if layoutSettings.shortcutIcon?has_content>
       <#assign shortcutIcon = layoutSettings.shortcutIcon/>
     <#elseif layoutSettings.VT_SHORTCUT_ICON?has_content>


Reply via email to