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/01/07 15:17:24 UTC

svn commit: r1650060 - /myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PanelRenderer.java

Author: lofwyr
Date: Wed Jan  7 14:17:23 2015
New Revision: 1650060

URL: http://svn.apache.org/r1650060
Log:
TOBAGO-1434: Move Layout-Manager-Logic from Server to Client

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/PanelRenderer.java

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/PanelRenderer.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/PanelRenderer.java?rev=1650060&r1=1650059&r2=1650060&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/PanelRenderer.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/PanelRenderer.java Wed Jan  7 14:17:23 2015
@@ -27,8 +27,6 @@ import org.apache.myfaces.tobago.interna
 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.Position;
-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;
@@ -72,12 +70,6 @@ public class PanelRenderer extends Layou
     writer.writeIdAttribute(clientId);
     writer.writeClassAttribute(Classes.create(panel));
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, panel);
-    final Style style = new Style(facesContext, panel);
-    // XXX hotfix for panels in sheets
-    if (style.getPosition() == null) {
-      style.setPosition(Position.RELATIVE);
-    }
-    writer.writeStyleAttribute(style);
     if (panel instanceof UIPanel && ((UIPanel) panel).getTip() != null) {
       writer.writeAttribute(HtmlAttributes.TITLE, ((UIPanel) panel).getTip(), true);
     }
@@ -104,18 +96,6 @@ public class PanelRenderer extends Layou
         || borderTop.greaterThan(Measure.ZERO) || borderBottom.greaterThan(Measure.ZERO)) {
       writer.startElement(HtmlElements.DIV, panel);
       writer.writeClassAttribute(Classes.create(panel, "content")); // needed to be scrollable inside of the panel
-      final Style inner = new Style(facesContext, panel);
-      // Todo: FIXME (be null may occur in sheets)
-      if (inner.getWidth() != null) {
-        inner.setWidth(inner.getWidth().subtract(borderLeft).subtract(borderRight));
-      }
-      // Todo: FIXME (be null may occur in sheets)
-      if (inner.getHeight() != null) {
-        inner.setHeight(inner.getHeight().subtract(borderTop).subtract(borderBottom));
-      }
-      inner.setLeft(borderLeft);
-      inner.setTop(borderTop);
-      writer.writeStyleAttribute(inner);
     }
   }