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/07/21 12:17:34 UTC

svn commit: r966166 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ tobago-extension/tobago-sandbox/src/main/java/org/apa...

Author: lofwyr
Date: Wed Jul 21 10:17:33 2010
New Revision: 966166

URL: http://svn.apache.org/viewvc?rev=966166&view=rev
Log:
TOBAGO-893: Optimize StyleClasses
 - change some renderers
TOBAGO-870: Weight of scrollbars should be computed in the browser
 - optimization
TOBAGO-825: Add markup support for any other graphical components
 - for tc:menuBar and tc:menuSeparator

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMenuBar.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuBarTagDeclaration.java
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuSeparatorTagDeclaration.java
    myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuSeparatorRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMenuBar.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMenuBar.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMenuBar.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIMenuBar.java Wed Jul 21 10:17:33 2010
@@ -19,7 +19,6 @@ package org.apache.myfaces.tobago.intern
 
 import org.apache.myfaces.tobago.component.OnComponentCreated;
 import org.apache.myfaces.tobago.config.Configurable;
-import org.apache.myfaces.tobago.context.Markup;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 
 import javax.faces.component.UIComponent;
@@ -29,11 +28,6 @@ import javax.faces.render.Renderer;
 
 public abstract class AbstractUIMenuBar extends UIPanel implements Configurable, OnComponentCreated {
 
-  // todo: may have a markup for menu bar, also may be a LayoutComponent/Container
-  public Markup getCurrentMarkup() {
-    return null;
-  }
-
   public void onComponentCreated(FacesContext context, UIComponent parent) {
     Renderer renderer = getRenderer(getFacesContext());
     if (renderer instanceof RendererBase) {

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuBarTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuBarTagDeclaration.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuBarTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuBarTagDeclaration.java Wed Jul 21 10:17:33 2010
@@ -22,6 +22,7 @@ import org.apache.myfaces.tobago.apt.ann
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
 
 /**
 * Renders a menu bar.<br />
@@ -46,5 +47,5 @@ import org.apache.myfaces.tobago.interna
         "org.apache.myfaces.tobago.MenuSelectOne",
         "org.apache.myfaces.tobago.MenuSeparator"
         })
-public interface MenuBarTagDeclaration extends HasIdBindingAndRendered {
+public interface MenuBarTagDeclaration extends HasIdBindingAndRendered, HasMarkup {
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuSeparatorTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuSeparatorTagDeclaration.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuSeparatorTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/MenuSeparatorTagDeclaration.java Wed Jul 21 10:17:33 2010
@@ -22,6 +22,7 @@ import org.apache.myfaces.tobago.apt.ann
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasMarkup;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsRendered;
 
 /**
@@ -34,5 +35,5 @@ import org.apache.myfaces.tobago.interna
     rendererType = RendererTypes.MENU_SEPARATOR,
     allowedChildComponenents = "NONE")
 
-public interface MenuSeparatorTagDeclaration extends IsRendered, HasBinding {
+public interface MenuSeparatorTagDeclaration extends IsRendered, HasBinding, HasMarkup {
 }

Modified: myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-extension/tobago-sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/NumberSliderRenderer.java Wed Jul 21 10:17:33 2010
@@ -83,7 +83,7 @@ public class NumberSliderRenderer extend
 
     writer.startElement(HtmlConstants.TABLE, slider);
     writer.writeIdAttribute(id);
-    writer.writeClassAttribute();
+    writer.writeClassAttribute(Classes.create(slider));
     writer.writeStyleAttribute(style);
     //writer.writeAttribute("border","1",false);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java Wed Jul 21 10:17:33 2010
@@ -55,12 +55,12 @@ public class BoxRenderer extends BoxRend
     }
 
     writer.startElement(HtmlConstants.FIELDSET, box);
-    writer.writeClassAttribute();
+    writer.writeClassAttribute(Classes.create(box));
     writer.writeStyleAttribute(style);
 
     if (label != null || labelString != null) {
       writer.startElement(HtmlConstants.LEGEND, box);
-      writer.writeClassAttribute();
+      writer.writeClassAttribute(Classes.create(box, "legend"));
 
       if (label != null) {
         RenderUtils.encode(facesContext, label);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java Wed Jul 21 10:17:33 2010
@@ -94,7 +94,7 @@ public class CalendarRenderer extends La
     writer.startElement(HtmlConstants.TABLE, component);
     writer.writeIdAttribute(id);
     HtmlRendererUtils.renderDojoDndItem(component, writer, true);
-    writer.writeClassAttribute();
+    writer.writeClassAttribute(Classes.create(output));
     Style style = new Style(facesContext, output);
     writer.writeStyleAttribute(style);
     writer.writeAttribute(HtmlAttributes.CELLSPACING, 0);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java Wed Jul 21 10:17:33 2010
@@ -19,6 +19,7 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.UIMenuBar;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
@@ -40,7 +41,7 @@ public class MenuBarRenderer extends Lay
     TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
     
     writer.startElement(HtmlConstants.OL, menuBar);
-    writer.writeClassAttribute();
+    writer.writeClassAttribute(Classes.create(menuBar));
   }
 
   @Override

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuSeparatorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuSeparatorRenderer.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuSeparatorRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuSeparatorRenderer.java Wed Jul 21 10:17:33 2010
@@ -17,9 +17,8 @@ package org.apache.myfaces.tobago.render
  * limitations under the License.
  */
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
@@ -30,13 +29,11 @@ import java.io.IOException;
 
 public class MenuSeparatorRenderer extends LayoutComponentRendererBase {
 
-  private static final Logger LOG = LoggerFactory.getLogger(MenuSeparatorRenderer.class);
-
   @Override
   public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
     TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
     writer.startElement(HtmlConstants.LI, component);
-    writer.writeClassAttribute();
+    writer.writeClassAttribute(Classes.create(component));
     writer.startElement(HtmlConstants.HR, component);    
     writer.endElement(HtmlConstants.HR);    
     writer.endElement(HtmlConstants.LI);    

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java Wed Jul 21 10:17:33 2010
@@ -21,6 +21,7 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.component.UIObject;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
@@ -45,7 +46,7 @@ public class ObjectRenderer extends Layo
     } else {
       writer.writeAttribute(HtmlAttributes.SRC, ResourceManagerUtils.getBlankPage(facesContext), false);
     }
-    writer.writeClassAttribute();
+    writer.writeClassAttribute(Classes.create(object));
     Style style = new Style(facesContext, object);
     writer.writeStyleAttribute(style);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java Wed Jul 21 10:17:33 2010
@@ -19,6 +19,7 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.UIOut;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
@@ -54,7 +55,7 @@ public class OutRenderer extends LayoutC
       Style style = new Style(facesContext, out);
       writer.writeStyleAttribute(style);
       HtmlRendererUtils.renderDojoDndItem(out, writer, true);
-      writer.writeClassAttribute();
+      writer.writeClassAttribute(Classes.create(out));
       HtmlRendererUtils.renderTip(out, writer);
     }
     if (escape) {

Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java Wed Jul 21 10:17:33 2010
@@ -26,6 +26,7 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.component.UIPopup;
 import org.apache.myfaces.tobago.config.Configurable;
 import org.apache.myfaces.tobago.context.ClientProperties;
+import org.apache.myfaces.tobago.context.Markup;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.context.TobagoFacesContext;
 import org.apache.myfaces.tobago.internal.component.AbstractUIPage;
@@ -37,7 +38,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.renderkit.PageRendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Overflow;
 import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
@@ -96,7 +96,7 @@ public class PageRenderer extends PageRe
     }
 
     // scrollbar weight
-    String name = clientId + ComponentUtils.SUB_SEPARATOR + "scrollbar-weight";
+    String name = clientId + ComponentUtils.SUB_SEPARATOR + "scrollbarWeight";
     String value = null;
     try {
       value = (String) facesContext.getExternalContext().getRequestParameterMap().get(name);
@@ -305,7 +305,7 @@ public class PageRenderer extends PageRe
         = client.getVerticalScrollbarWeight() == null || client.getHorizontalScrollbarWeight() == null;
     if (calculateScrollbarWeight) {
       facesContext.getOnloadScripts().add(
-          "Tobago.calculateScrollbarWeights('" + clientId + ComponentUtils.SUB_SEPARATOR + "scrollbar-weight" + "');");
+          "Tobago.calculateScrollbarWeights('" + clientId + ComponentUtils.SUB_SEPARATOR + "scrollbarWeight" + "');");
     } else {
       facesContext.getOnloadScripts().add(
           "Tobago.Config.set('Tobago', 'verticalScrollbarWeight', '"
@@ -357,7 +357,7 @@ public class PageRenderer extends PageRe
     writer.writeAttribute(HtmlAttributes.ONLOAD, "Tobago.init('" + clientId + "');", false);
 //    writer.writeAttribute("onunload", "Tobago.onexit();", null);
     writer.writeIdAttribute(clientId);
-    writer.writeClassAttribute();
+    writer.writeClassAttribute(Classes.create(page));
 
     writer.startJavascript();
     writer.write("Tobago.pngFixBlankImage = '");
@@ -416,28 +416,16 @@ public class PageRenderer extends PageRe
     writer.endElement(HtmlConstants.INPUT);
 
     if (calculateScrollbarWeight) {
-      Style style = new Style();
-      style.setOverflow(Overflow.SCROLL);
-      style.setWidth(Measure.valueOf(100));
-      style.setHeight(Measure.valueOf(100));
-      style.setPadding(Measure.ZERO);
-      style.setMargin(Measure.ZERO);
-      style.setZIndex(-1);
-
       writer.startElement(HtmlConstants.DIV, null);
-      writer.writeStyleAttribute(style);
-
+      writer.writeClassAttribute(Classes.create(page, "scrollbarWeight", Markup.NULL));
       writer.startElement(HtmlConstants.DIV, null);
-      style.setOverflow(null);
-      writer.writeStyleAttribute(style);
       writer.endElement(HtmlConstants.DIV);
-
       writer.endElement(HtmlConstants.DIV);
 
       writer.startElement(HtmlConstants.INPUT, null);
       writer.writeAttribute(HtmlAttributes.TYPE, "hidden", false);
-      writer.writeNameAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "scrollbar-weight");
-      writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "scrollbar-weight");
+      writer.writeNameAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "scrollbarWeight");
+      writer.writeIdAttribute(clientId + ComponentUtils.SUB_SEPARATOR + "scrollbarWeight");
       writer.endElement(HtmlConstants.INPUT);
     }
 
@@ -489,7 +477,7 @@ public class PageRenderer extends PageRe
 //    page.encodeLayoutBegin(facesContext);
     
     writer.startElement(HtmlConstants.DIV, page);
-    writer.writeClassAttribute();
+    writer.writeClassAttribute(Classes.create(page, "content"));
     Style style = new Style(facesContext, page);
     // XXX position the div, so that the scrollable area is correct.
     // XXX better to take this fact into layout management.

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=966166&r1=966165&r2=966166&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Wed Jul 21 10:17:33 2010
@@ -28,7 +28,7 @@ fieldset.tobago-box {
 /*  padding: 20px 10px 10px 10px;*/
 }
 
-legend.tobago-box {
+.tobago-box-legend {
   color: black; /*  font-size: 14px;*/
 }
 
@@ -489,6 +489,20 @@ iframe.tobago-menu-ie6bugfix {
   z-index: 0;
 }
 
+.tobago-page-content {
+  position: absolute;
+}
+
+.tobago-page-scrollbarWeight {
+  width: 100px;
+  height: 100px;
+  overflow: scroll;
+  margin: 0;
+  padding: 0;
+  z-index: -1;
+  visibility: hidden;
+}
+
 /* popup -------------------------------------------------------------- */
 
 .tobago-popup-shield {