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 2015/09/16 11:17:38 UTC

svn commit: r1703372 [4/4] - in /myfaces/tobago/branches/tobago-3.0.x: tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/ tobago-core/src/main/java/org/apache/myfaces/tobago/inte...

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRendererOld.java Wed Sep 16 09:17:36 2015
@@ -21,12 +21,10 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.UIPopup;
 import org.apache.myfaces.tobago.context.Markup;
-import org.apache.myfaces.tobago.internal.component.AbstractUIPage;
 import org.apache.myfaces.tobago.internal.util.FacesContextUtils;
 import org.apache.myfaces.tobago.layout.Measure;
 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.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
@@ -80,25 +78,17 @@ public class PopupRendererOld extends La
     final String clientId = popup.getClientId(facesContext);
 
     // XXX May be computed in the "Layout Manager Phase"
-    final AbstractUIPage page = ComponentUtils.findPage(facesContext);
-    if (popup.getLeft() == null) {
-      popup.setLeft(page.getCurrentWidth().subtract(popup.getCurrentWidth()).divide(2));
-    }
-    if (popup.getTop() == null) {
-      popup.setTop(page.getCurrentHeight().subtract(popup.getCurrentHeight()).divide(2));
-    }
+//    final AbstractUIPage page = ComponentUtils.findPage(facesContext);
+//    if (popup.getLeft() == null) {
+//      popup.setLeft(page.getCurrentWidth().subtract(popup.getCurrentWidth()).divide(2));
+//    }
+//    if (popup.getTop() == null) {
+//      popup.setTop(page.getCurrentHeight().subtract(popup.getCurrentHeight()).divide(2));
+//    }
 
     writer.startElement(HtmlElements.DIV, popup);
     writer.writeIdAttribute(clientId);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, popup);
-    final Style style = new Style(facesContext, popup);
-    Integer zIndex = popup.getZIndex();
-    if (zIndex == null) {
-      zIndex = 100;
-      LOG.warn("No z-index found for UIPopup. Set to " + zIndex);
-    }
-    style.setZIndex(zIndex);
-    writer.writeStyleAttribute(style);
     writer.writeClassAttribute(Classes.create(popup));
   }
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java Wed Sep 16 09:17:36 2015
@@ -24,7 +24,6 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.component.UIProgress;
 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.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
@@ -60,13 +59,12 @@ public class ProgressRenderer extends La
       title = Integer.toString((int) percent) + " %";
     }
 
-    final Style style = new Style(facesContext, progress);
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
     writer.startElement(HtmlElements.DIV, progress);
     writer.writeClassAttribute(Classes.create(progress));
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, progress);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(progress.getStyle());
     if (title != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, String.valueOf(title), true);
     }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ScriptRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ScriptRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ScriptRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ScriptRenderer.java Wed Sep 16 09:17:36 2015
@@ -32,26 +32,6 @@ public class ScriptRenderer extends Rend
   public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
     super.prepareRender(facesContext, component);
     final UIScript scriptComponent = (UIScript) component;
-    final String exit = scriptComponent.getOnexit();
-    if (exit != null) {
-      FacesContextUtils.addOnexitScript(facesContext, exit);
-    }
-    final String submit = scriptComponent.getOnsubmit();
-    if (submit != null) {
-      FacesContextUtils.addOnsubmitScript(facesContext, submit);
-    }
-    final String load = scriptComponent.getOnload();
-    if (load != null) {
-      FacesContextUtils.addOnloadScript(facesContext, load);
-    }
-    final String unload = scriptComponent.getOnunload();
-    if (unload != null) {
-      FacesContextUtils.addOnunloadScript(facesContext, unload);
-    }
-    final String script = scriptComponent.getScript();
-    if (script != null) {
-      FacesContextUtils.addScriptBlock(facesContext, script);
-    }
     final String file = scriptComponent.getFile();
     if (file != null) {
       FacesContextUtils.addScriptFile(facesContext, file);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java Wed Sep 16 09:17:36 2015
@@ -24,7 +24,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
 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.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -83,7 +82,7 @@ public class SelectBooleanCheckboxRender
     final LabelWithAccessKey label = new LabelWithAccessKey(select);
 
     writer.startElement(HtmlElements.DIV, select);
-    writer.writeStyleAttribute(new Style(facesContext, select));
+    writer.writeStyleAttribute(select.getStyle());
     // todo: simplify css class management
     String classes = Classes.create(select).getStringValue() + " " + BootstrapClass.CHECKBOX.getName();
     if (disabled) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java Wed Sep 16 09:17:36 2015
@@ -25,7 +25,6 @@ import org.apache.myfaces.tobago.context
 import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.renderkit.SelectManyRendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -61,14 +60,11 @@ public class SelectManyCheckboxRenderer
     final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, select);
     final boolean disabled = select.isDisabled();
     final boolean readonly = select.isReadonly();
-    final Style style = new Style(facesContext, select);
     final boolean required = select.isRequired();
-    // fixme: use CSS, not the Style Attribute for "display"
-    style.setDisplay(null);
 
     writer.startElement(HtmlElements.OL, select);
     writer.writeIdAttribute(id);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(select.getStyle());
     writer.writeClassAttribute(Classes.create(select));
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     if (title != null) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java Wed Sep 16 09:17:36 2015
@@ -22,7 +22,6 @@ package org.apache.myfaces.tobago.render
 import org.apache.myfaces.tobago.component.UISelectManyListbox;
 import org.apache.myfaces.tobago.renderkit.SelectManyRendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -65,8 +64,7 @@ public class SelectManyListboxRenderer e
     if (tabIndex != null) {
       writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
     }
-    final Style style = new Style(facesContext, select);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(select.getStyle());
     writer.writeClassAttribute(Classes.create(select), BootstrapClass.FORM_CONTROL);
     writer.writeAttribute(HtmlAttributes.MULTIPLE, HtmlAttributes.MULTIPLE, false);
     if (title != null) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java Wed Sep 16 09:17:36 2015
@@ -21,7 +21,6 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.UISelectOneChoice;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -59,8 +58,7 @@ public class SelectOneChoiceRenderer ext
     if (tabIndex != null) {
       writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
     }
-    final Style style = new Style(facesContext, select);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(select.getStyle());
     writer.writeClassAttribute(Classes.create(select), BootstrapClass.FORM_CONTROL);
     if (title != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, title, true);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java Wed Sep 16 09:17:36 2015
@@ -21,7 +21,6 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.UISelectOneListbox;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -62,8 +61,7 @@ public class SelectOneListboxRenderer ex
     if (tabIndex != null) {
       writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
     }
-    final Style style = new Style(facesContext, select);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(select.getStyle());
     writer.writeClassAttribute(Classes.create(select), BootstrapClass.FORM_CONTROL);
     final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, select);
     if (title != null) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java Wed Sep 16 09:17:36 2015
@@ -26,7 +26,6 @@ import org.apache.myfaces.tobago.context
 import org.apache.myfaces.tobago.internal.util.ObjectUtils;
 import org.apache.myfaces.tobago.layout.Measure;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -62,14 +61,11 @@ public class SelectOneRadioRenderer exte
     final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, select);
     final boolean disabled = select.isDisabled();
     final boolean readonly = select.isReadonly();
-    final Style style = new Style(facesContext, select);
     final boolean required = select.isRequired();
-    // fixme: use CSS, not the Style Attribute for "display"
-    style.setDisplay(null);
 
     writer.startElement(HtmlElements.OL, select);
     writer.writeIdAttribute(id);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(select.getStyle());
     writer.writeClassAttribute(Classes.create(select));
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, select);
     if (title != null) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java Wed Sep 16 09:17:36 2015
@@ -140,11 +140,7 @@ public class SheetRenderer extends Layou
   public void encodeEnd(final FacesContext facesContext, final UIComponent uiComponent) throws IOException {
 
     final UISheet sheet = (UISheet) uiComponent;
-
-    final Style style = new Style(facesContext, sheet);
-
     final String sheetId = sheet.getClientId(facesContext);
-
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
     // Outer sheet div
@@ -152,7 +148,7 @@ public class SheetRenderer extends Layou
     writer.writeIdAttribute(sheetId);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, sheet);
     writer.writeClassAttribute(Classes.create(sheet));
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(sheet.getStyle());
     final UIComponent facetReload = sheet.getFacet(Facets.RELOAD);
     if (facetReload != null && facetReload instanceof UIReload && facetReload.isRendered()) {
       final UIReload update = (UIReload) facetReload;
@@ -167,13 +163,12 @@ public class SheetRenderer extends Layou
 
     final boolean rowAction = HtmlRendererUtils.renderSheetCommands(sheet, facesContext, writer);
 
-    renderSheet(facesContext, sheet, rowAction, style);
+    renderSheet(facesContext, sheet, rowAction);
 
     writer.endElement(HtmlElements.DIV);
   }
 
-  private void renderSheet(
-      final FacesContext facesContext, final UISheet sheet, final boolean hasClickAction, final Style style)
+  private void renderSheet(final FacesContext facesContext, final UISheet sheet, final boolean hasClickAction)
       throws IOException {
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
     final String sheetId = sheet.getClientId(facesContext);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/StyleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/StyleRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/StyleRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/StyleRenderer.java Wed Sep 16 09:17:36 2015
@@ -19,17 +19,22 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
+import org.apache.myfaces.tobago.component.SupportsStyle;
 import org.apache.myfaces.tobago.component.UIStyle;
 import org.apache.myfaces.tobago.internal.util.FacesContextUtils;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.css.Style;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
 
-
 public class StyleRenderer extends RendererBase {
 
+  private static final Logger LOG = LoggerFactory.getLogger(StyleRenderer.class);
+
   public void prepareRender(final FacesContext facesContext, final UIComponent component) throws IOException {
     super.prepareRender(facesContext, component);
     final UIStyle styleComponent = (UIStyle) component;
@@ -37,9 +42,15 @@ public class StyleRenderer extends Rende
     if (file != null) {
       FacesContextUtils.addStyleFile(facesContext, file);
     }
-    final String style = styleComponent.getStyle();
-    if (style != null) {
-      FacesContextUtils.addStyleBlock(facesContext, style);
+
+    final Style style = new Style(styleComponent);
+    if (!style.isEmpty()) {
+      final UIComponent parent = styleComponent.getParent();
+      if (parent instanceof SupportsStyle) {
+        ((SupportsStyle)parent).setStyle(style);
+      } else {
+        LOG.warn("The parent of a style component doesn't support style: " + parent.getClientId(facesContext));
+      }
     }
   }
 }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TabGroupRenderer.java Wed Sep 16 09:17:36 2015
@@ -36,7 +36,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
 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.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -107,7 +106,7 @@ public class TabGroupRenderer extends La
     writer.writeIdAttribute(clientId);
     writer.writeClassAttribute(Classes.create(tabGroup));
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, tabGroup);
-    writer.writeStyleAttribute(new Style(facesContext, tabGroup));
+    writer.writeStyleAttribute(tabGroup.getStyle());
     writer.writeAttribute(HtmlAttributes.SWITCHTYPE, switchType, false);
     final String[] clientIds
         = ComponentUtils.evaluateClientIds(facesContext, tabGroup, tabGroup.getRenderedPartially());

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java Wed Sep 16 09:17:36 2015
@@ -22,7 +22,6 @@ package org.apache.myfaces.tobago.render
 import org.apache.myfaces.tobago.component.UITextarea;
 import org.apache.myfaces.tobago.config.TobagoConfig;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -76,8 +75,7 @@ public class TextareaRenderer extends In
     }
 
     writer.writeClassAttribute(Classes.create(input), BootstrapClass.FORM_CONTROL);
-    final Style style = new Style(facesContext, input);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(input.getStyle());
     int maxLength = -1;
     final String pattern = null;
     for (final Validator validator : input.getValidators()) {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ToolBarRendererOld.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ToolBarRendererOld.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ToolBarRendererOld.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ToolBarRendererOld.java Wed Sep 16 09:17:36 2015
@@ -45,7 +45,7 @@ public class ToolBarRendererOld extends
     writer.writeIdAttribute(toolBar.getClientId(facesContext));
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, toolBar);
     writer.writeClassAttribute(Classes.create(toolBar));
-    final Style style = new Style(facesContext, toolBar);
+    final Style style = toolBar.getStyle();
     final boolean right = UIToolBar.ORIENTATION_RIGHT.equals(toolBar.getOrientation());
     if (right) {
       style.setTextAlign(TextAlign.RIGHT);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeCommandRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeCommandRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeCommandRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeCommandRenderer.java Wed Sep 16 09:17:36 2015
@@ -25,7 +25,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.renderkit.CommandRendererBase;
 import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.Command;
 import org.apache.myfaces.tobago.renderkit.html.CommandMap;
 import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
@@ -73,7 +72,7 @@ public class TreeCommandRenderer extends
       writer.writeAttribute(DataAttributes.COMMANDS, JsonUtils.encode(map), true);
       writer.writeNameAttribute(clientId);
     }
-    writer.writeStyleAttribute(createStyle(facesContext, command));
+    writer.writeStyleAttribute(command.getStyle());
     writer.writeClassAttribute(Classes.create(command));
     writer.writeIdAttribute(clientId);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, command);
@@ -90,10 +89,6 @@ public class TreeCommandRenderer extends
     HtmlRendererUtils.writeLabelWithAccessKey(writer, label);
   }
 
-  protected Style createStyle(final FacesContext facesContext, final UITreeCommand link) {
-    return new Style(facesContext, link);
-  }
-
   @Override
   public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
     final UITreeCommand command = (UITreeCommand) component;

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeLabelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeLabelRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeLabelRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeLabelRenderer.java Wed Sep 16 09:17:36 2015
@@ -25,7 +25,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.util.StringUtils;
 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.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
@@ -57,7 +56,7 @@ public class TreeLabelRenderer extends L
       writer.startElement(HtmlElements.LABEL, label);
       writer.writeClassAttribute(Classes.create(label));
       HtmlRendererUtils.writeDataAttributes(facesContext, writer, label);
-      writer.writeStyleAttribute(createStyle(facesContext, label));
+      writer.writeStyleAttribute(label.getStyle());
       final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, label);
       if (title != null) {
         writer.writeAttribute(HtmlAttributes.TITLE, title, true);
@@ -68,8 +67,4 @@ public class TreeLabelRenderer extends L
       writer.endElement(HtmlElements.LABEL);
     }
   }
-
-  protected Style createStyle(final FacesContext facesContext, final UITreeLabel link) {
-    return new Style(facesContext, link);
-  }
 }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeListboxRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeListboxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeListboxRenderer.java Wed Sep 16 09:17:36 2015
@@ -71,8 +71,7 @@ public class TreeListboxRenderer extends
     final AbstractUITree tree = (AbstractUITree) component;
     final String clientId = tree.getClientId(facesContext);
     final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
-    final Style style = new Style(facesContext, tree);
-//    final Style scrollDivStyle = new Style();
+    //    final Style scrollDivStyle = new Style();
 
     writer.startElement(HtmlElements.DIV, tree);
 //    scrollDivStyle.setWidth(Measure.valueOf(6 * 160)); // todo: depth * width of a select
@@ -84,7 +83,7 @@ public class TreeListboxRenderer extends
     writer.startElement(HtmlElements.DIV, tree);
     writer.writeClassAttribute(Classes.create(tree));
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, tree);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(tree.getStyle());
 
     writer.startElement(HtmlElements.INPUT, tree);
     writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN, false);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuCommandRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuCommandRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuCommandRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuCommandRenderer.java Wed Sep 16 09:17:36 2015
@@ -19,34 +19,5 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
-import org.apache.myfaces.tobago.component.UITreeCommand;
-import org.apache.myfaces.tobago.internal.component.AbstractUITreeNode;
-import org.apache.myfaces.tobago.layout.Measure;
-import org.apache.myfaces.tobago.renderkit.css.Style;
-
-import javax.faces.context.FacesContext;
-
 public class TreeMenuCommandRenderer extends TreeCommandRenderer {
-
-  protected Style createStyle(final FacesContext facesContext, final UITreeCommand node) {
-
-    final AbstractUITreeNode parent = (AbstractUITreeNode) node.getParent();
-    final int level = parent.getLevel();
-//    final boolean folder = parent.isFolder();
-
-    final Style style = new Style();
-    Measure paddingLeft = getResourceManager().getThemeMeasure(facesContext, node, "custom.padding-left", Measure.ZERO);
-    paddingLeft = paddingLeft.multiply(level);
-    style.setPaddingLeft(paddingLeft);
-/*
-    Measure width = ((UITreeMenu)(node.getParent().getParent().getParent())).getCurrentWidth();
-    width = width.subtract(4); // XXX 4 = border + padding
-    width = width.subtractNotNegative(paddingLeft);
-    if (folder) {
-      width = width.subtract(16);
-    }
-    style.setWidth(width);
-*/
-    return style;
-  }
 }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuLabelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuLabelRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuLabelRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeMenuLabelRenderer.java Wed Sep 16 09:17:36 2015
@@ -19,38 +19,5 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
-import org.apache.myfaces.tobago.component.UITreeLabel;
-import org.apache.myfaces.tobago.internal.component.AbstractUITreeNode;
-import org.apache.myfaces.tobago.layout.Measure;
-import org.apache.myfaces.tobago.renderkit.css.Style;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.faces.context.FacesContext;
-
 public class TreeMenuLabelRenderer extends TreeLabelRenderer {
-
-  private static final Logger LOG = LoggerFactory.getLogger(TreeMenuLabelRenderer.class);
-
-  protected Style createStyle(final FacesContext facesContext, final UITreeLabel node) {
-
-    final AbstractUITreeNode parent = (AbstractUITreeNode) node.getParent();
-    final int level = parent.getLevel();
-//    final boolean folder = parent.isFolder();
-
-    final Style style = new Style();
-    Measure paddingLeft = getResourceManager().getThemeMeasure(facesContext, node, "custom.padding-left");
-    paddingLeft = paddingLeft.multiply(level);
-    style.setPaddingLeft(paddingLeft);
-/*
-    Measure width = ((UITreeMenu)(node.getParent().getParent().getParent())).getCurrentWidth();
-    width = width.subtract(4); // XXX 4 = border + padding
-    width = width.subtractNotNegative(paddingLeft);
-    if (folder) {
-      width = width.subtract(16);
-    }
-    style.setWidth(width);
-*/
-    return style;
-  }
 }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeNodeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeNodeRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeNodeRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeNodeRenderer.java Wed Sep 16 09:17:36 2015
@@ -22,7 +22,6 @@ package org.apache.myfaces.tobago.render
 import org.apache.myfaces.tobago.internal.component.AbstractUIData;
 import org.apache.myfaces.tobago.internal.component.AbstractUITreeNode;
 import org.apache.myfaces.tobago.layout.Display;
-import org.apache.myfaces.tobago.layout.LayoutBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
@@ -60,17 +59,15 @@ public class TreeNodeRenderer extends Tr
       writer.writeAttribute(DataAttributes.TREE_PARENT, parentId, false);
     }
 
-    final Style style = new Style();
+    Style style = node.getStyle();
     // In the case of a sheet, we need not hiding the node, because the whole TR will be hidden.
     if (!dataRendersRowContainer && !visible) {
+      if (style == null) {
+        style = new Style();
+      }
       style.setDisplay(Display.none);
     }
 
-    // div style (width)
-    final Style widthStyle = new Style(facesContext, (LayoutBase) data);
-    if (widthStyle.getWidth() != null) {
-      style.setWidth(widthStyle.getWidth().subtract(22)); // fixme: 4 + 18 for scrollbar
-    }
     writer.writeStyleAttribute(style);
   }
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeRenderer.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeRenderer.java Wed Sep 16 09:17:36 2015
@@ -23,12 +23,11 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.internal.component.AbstractUIData;
 import org.apache.myfaces.tobago.internal.component.AbstractUITree;
 import org.apache.myfaces.tobago.model.ExpandedState;
-import org.apache.myfaces.tobago.model.SelectedState;
 import org.apache.myfaces.tobago.model.Selectable;
+import org.apache.myfaces.tobago.model.SelectedState;
 import org.apache.myfaces.tobago.model.TreePath;
 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.DataAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
@@ -83,8 +82,7 @@ public class TreeRenderer extends Layout
 
     writer.startElement(HtmlElements.DIV, tree);
     writer.writeClassAttribute(Classes.create(tree));
-    final Style style = new Style(facesContext, tree);
-    writer.writeStyleAttribute(style);
+    writer.writeStyleAttribute(tree.getStyle());
     writer.writeIdAttribute(clientId);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, tree);
     writer.writeAttribute("data-tobago-scroll-panel", "true", true);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/util/HtmlRendererUtils.java Wed Sep 16 09:17:36 2015
@@ -204,15 +204,6 @@ public final class HtmlRendererUtils {
         submittedValue != null ?  new String[] {submittedValue}: null, null, writer, facesContext);
   }
 
-  /**
-   * @deprecated Since Tobago 2.0.7
-   */
-  @Deprecated
-  public static void renderSelectItems(final UIInput component, final Iterable<SelectItem> items, final Object[] values,
-      final Boolean onlySelected, final TobagoResponseWriter writer, final FacesContext facesContext)
-      throws IOException {
-    renderSelectItems(component, items, values, null, onlySelected, writer, facesContext);
-  }
   public static void renderSelectItems(final UIInput component, final Iterable<SelectItem> items, final Object[] values,
       final String[] submittedValues, final Boolean onlySelected, final TobagoResponseWriter writer,
       final FacesContext facesContext) throws IOException {

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Wed Sep 16 09:17:36 2015
@@ -888,37 +888,47 @@ var Tobago = {
   initCss: function (elements) {
     // element styles
     console.time("[tobago] initCss"); // @DEV_ONLY
-    Tobago.Utils.selectWithJQuery(elements, ".tobago-image[data-tobago-style]").add(
-        Tobago.Utils.selectWithJQuery(elements, ".modal-dialog[data-tobago-style]")).each(function () {
-          var element = jQuery(this);
-          var data = element.data("tobago-style");
-/* todo
-          if (data.width) {
-            element.css("width", data.width);
-          }
-          if (data.height) {
-            element.css("height", data.height);
-          }
-*/
-          if (data) {
-            element.css({
-              left: data.left,
-              top: data.top,
-              width: data.width,
-              height: data.height,
-              zIndex: data.zIndex
-            });
-          }
-        });
-    /* XXX this is the old Tobago 2.0 behaviour, should be deleded und removing these information from the tags
     Tobago.Utils.selectWithJQuery(elements, "[data-tobago-style]").each(function () {
       var element = jQuery(this);
-      if (Tobago.browser.isMsie678) { // IE before 9 doesn't support multiple backgrounds, so we use only the first.
-        Tobago.fixMultiBackgroundIE8(element);
-      }
-      element.css(element.data("tobago-style"));
+      var data = element.data("tobago-style");
+
+      // set only known properties (because of security)
+      element.css({
+        width: data.width,
+        height: data.height,
+
+        minWidth: data.minWidth,
+        minHeight: data.minHeight,
+        maxWidth: data.maxWidth,
+        maxHeight: data.maxHeight,
+
+        left: data.left,
+        right: data.right,
+        top: data.top,
+        bottom: data.bottom,
+
+        paddingLeft: data.paddingLeft,
+        paddingRight: data.paddingRight,
+        paddingTop: data.paddingTop,
+        paddingBottom: data.paddingBottom,
+
+        marginLeft: data.marginLeft,
+        marginRight: data.marginRight,
+        marginTop: data.marginTop,
+        marginBottom: data.marginBottom,
+
+        overflowX: data.overflowX,
+        overflowY: data.overflowY,
+        display: data.display,
+        position: data.position,
+
+        backgroundImage: data.backgroundImage,         // TBD
+        backgroundPosition: data.backgroundPosition,   // TBD
+        zIndex: data.zIndex, // TBD: needed? will be set by Tobago? check org.apache.myfaces.tobago.renderkit.css.Style
+        textAlign: data.textAlign
+      });
     });
-*/
+
     console.timeEnd("[tobago] initCss"); // @DEV_ONLY
   },
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg?rev=1703372&r1=1703371&r2=1703372&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg Wed Sep 16 09:17:36 2015
@@ -44,7 +44,6 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.util.StringUtils;
 import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.renderkit.MarginValues;
-import org.apache.myfaces.tobago.renderkit.SpacingValues;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
 import javax.el.ELException;
 import javax.faces.FacesException;
@@ -321,6 +320,18 @@ OrientationProperty(property) ::= <<
 <NormalProperty(property)>
 >>
 
+PositionProperty(property) ::= <<
+<NormalProperty(property)>
+>>
+
+OverflowProperty(property) ::= <<
+<NormalProperty(property)>
+>>
+
+StyleProperty(property) ::= <<
+<NormalProperty(property)>
+>>
+
 OrderByProperty(property) ::= <<
 <NormalProperty(property)>
 >>