You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/04/01 17:23:14 UTC

svn commit: r930000 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java

Author: lofwyr
Date: Thu Apr  1 15:23:13 2010
New Revision: 930000

URL: http://svn.apache.org/viewvc?rev=930000&view=rev
Log:
TOBAGO-832: Cleanup: The new menu bar doesn't need the size of the page on server side.

Modified:
    myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java?rev=930000&r1=929999&r2=930000&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java Thu Apr  1 15:23:13 2010
@@ -283,11 +283,6 @@ public class PageRenderer extends PageRe
       }
     }
 
-    UIMenuBar menuBar = (UIMenuBar) page.getFacet(Facets.MENUBAR);
-    if (menuBar != null) {
-      facesContext.getOnloadScripts().add("Tobago.setElementWidth('"
-          + menuBar.getClientId(facesContext) + "', Tobago.getBrowserInnerWidth())");
-    }
     writer.startJavascript();
     // onload script
     writeEventFunction(writer, facesContext.getOnloadScripts(), "load", false);
@@ -414,6 +409,7 @@ public class PageRenderer extends PageRe
     }
 */
 
+    UIMenuBar menuBar = (UIMenuBar) page.getFacet(Facets.MENUBAR);
     if (menuBar != null) {
       menuBar.getAttributes().put(Attributes.PAGE_MENU, Boolean.TRUE);
       RenderUtil.encode(facesContext, menuBar);