myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarinsc...@apache.org
Subject svn commit: r292892 - /myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
Date Sat, 01 Oct 2005 01:28:33 GMT
Author: mmarinschek
Date: Fri Sep 30 18:28:27 2005
New Revision: 292892

URL: http://svn.apache.org/viewcvs?rev=292892&view=rev
Log:
correctly handle facet header when rendering

Modified:
    myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java

Modified: myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java?rev=292892&r1=292891&r2=292892&view=diff
==============================================================================
--- myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
(original)
+++ myfaces/sandbox/trunk/src/java/org/apache/myfaces/custom/accordion/HtmlAccordionPanelRenderer.java
Fri Sep 30 18:28:27 2005
@@ -85,7 +85,12 @@
                         }
                         else
                         {
-                            writer.writeText("test",JSFAttr.LABEL_ATTR);
+                            UIComponent header = pane.getFacet("header");
+
+                            if(header == null)
+                                throw new IllegalStateException("You need to set a label
on the tab or include a facet with name 'header' into it.");
+
+                            RendererUtils.renderChild(context, header);
                         }
                         writer.endElement(HTML.DIV_ELEM);
                         writer.startElement(HTML.DIV_ELEM, child);



Mime
View raw message