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/20 08:55:59 UTC

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

Author: lofwyr
Date: Tue Apr 20 06:55:59 2010
New Revision: 935817

URL: http://svn.apache.org/viewvc?rev=935817&view=rev
Log:
TOBAGO-869: Command facet on tc:panel
 - Hotfix to make the panel visible in a sheet

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

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java?rev=935817&r1=935816&r2=935817&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java Tue Apr 20 06:55:59 2010
@@ -25,6 +25,7 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.context.TobagoFacesContext;
 import org.apache.myfaces.tobago.internal.component.AbstractUIPanel;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
+import org.apache.myfaces.tobago.renderkit.css.Position;
 import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
@@ -64,7 +65,7 @@ public class PanelRenderer extends Layou
   @Override
   public void encodeBegin(FacesContext facesContext, UIComponent component) throws IOException {
     
-    // UIPanel or UICell
+    // UIPanel or UICell (deprecated)
     AbstractUIPanel panel = (AbstractUIPanel) component;
     TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
 
@@ -74,6 +75,10 @@ public class PanelRenderer extends Layou
     writer.writeIdAttribute(clientId);
     writer.writeClassAttribute();
     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);