-
1. Re: rich:columns within rich:tab bug?
grundor Sep 18, 2008 2:18 PM (in response to grundor)Sorry - my bad.
I should have read the docs better:
The <rich:columns> tag is initialized during components tree building process. This process precedes page rendering at "Render Response" JSF phase. To be rendered properly the component needs all it variables to be initialized while the components tree is being building. A javax.servlet.jsp.JspTagException occurs if <rich:columns> uses variables passed from other components, if these variables are initialized during rendering. Thus, when <rich:columns> is asking for such variables they do not already exist. Use <c:forEach> JSP standard tag as workaround. -
2. Re: rich:columns within rich:tab bug?
shadowcreeper Sep 18, 2008 2:49 PM (in response to grundor)ok, dumb question, but where is this doc found?
-
3. Re: rich:columns within rich:tab bug?
grundor Sep 18, 2008 3:20 PM (in response to grundor)When viewing the online demo you can click the Documentation link.
Here is the specific link for rich:columns:
http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/columns.html
I think there is a problem with the example code for the workaround, however. It doesn't make sense as written. I think it should be:<rich:dataTable value="#{bean.data}" var="var"> <c:forEach items="#{var.columns}" var="col"> <rich:column> ... </rich:column> </c:forEach> </rich:dataTable>
Do I have that right?
-Mark -
4. Re: rich:columns within rich:tab bug?
shadowcreeper Sep 18, 2008 4:52 PM (in response to grundor)No. See: http://www.ilikespam.com/blog/c:foreach-vs-ui:repeat-in-facelets
Basically, the c:forEach is processed before the rich:dataTable, thus it will not be able to see any var set by the dataTable.
The individual rich:column should be able to see it though as the c:forEach will have already run creating several rich:column elements which are processed at the same time as the dataTable.
So, probably something more like this:<rich:tab label="Tab 2" name="tab2"> <rich:dataTable value="#{bean.values}" var="_value"> <c:forEach value="#{bean.cols}" var="_col"> <rich:column rendered="#{bean.show}" /> </c:forEach> </rich:dataTable> </rich:tab>