myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1746458 - in /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag: BoxRenderer.java BoxRendererBase.java
Date Wed, 01 Jun 2016 13:26:47 GMT
Author: lofwyr
Date: Wed Jun  1 13:26:47 2016
New Revision: 1746458

URL: http://svn.apache.org/viewvc?rev=1746458&view=rev
Log:
clean up

Removed:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRendererBase.java
Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java?rev=1746458&r1=1746457&r2=1746458&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/BoxRenderer.java
Wed Jun  1 13:26:47 2016
@@ -21,6 +21,7 @@ package org.apache.myfaces.tobago.render
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UIBox;
 import org.apache.myfaces.tobago.component.UIMenuBar;
+import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -37,7 +38,7 @@ import javax.faces.component.UIPanel;
 import javax.faces.context.FacesContext;
 import java.io.IOException;
 
-public class BoxRenderer extends BoxRendererBase {
+public class BoxRenderer extends RendererBase {
 
     private static final Logger LOG = LoggerFactory.getLogger(BoxRenderer.class);
 
@@ -92,6 +93,19 @@ public class BoxRenderer extends BoxRend
     }
 
     @Override
+    public boolean getRendersChildren() {
+        return true;
+    }
+
+    @Override
+    public void encodeChildren(final FacesContext facesContext, final UIComponent component)
throws IOException {
+        if (component instanceof UIBox && ((UIBox) component).isCollapsed()) {
+            return;
+        }
+        super.encodeChildren(facesContext, component);
+    }
+
+    @Override
     public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws
IOException {
         final TobagoResponseWriter writer = HtmlRendererUtils.getTobagoResponseWriter(facesContext);
         writer.endElement(HtmlElements.DIV);



Mime
View raw message