This content has been marked as final.
Show 2 replies
-
1. Re: subTable rendering problem
nbelaevski Feb 13, 2009 8:27 PM (in response to jinpsu)Hello,
The same problem as here: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=150228. Empty rows are coming from rich:column elements, you can just hide them as a workaround:<style type="text/css"> .hidden { display: none; } </style> <rich:dataTable var="person" value="#{forum5Bean.persons}" rowKeyVar="rk" rowClasses="hidden"> <rich:column colspan="1"> <f:facet name="header"> <h:outputText value="Mother"/> </f:facet> </rich:column> <rich:column colspan="1"> <f:facet name="header"> <h:outputText value="Father"/> </f:facet> </rich:column> <rich:column colspan="1"> <f:facet name="header"> <h:outputText value="Children"/> </f:facet> </rich:column> <rich:subTable rendered="#{empty person.children12}" value="#{person}"> <rich:column> <h:outputText value="#{person.mother}"/> </rich:column> <rich:column> <h:outputText value="#{person.father}"/> </rich:column> <rich:column> <h:outputText value="No Children"/> </rich:column> </rich:subTable> <rich:subTable rendered="#{not empty person.children12}" value="#{person.children12}" var="child" rowKeyVar="childIdx"> <rich:column rowspan="#{fn:length(person.children12)}" rendered="#{childIdx == 0}"> <h:outputText value="#{person.mother}"/> </rich:column> <rich:column rowspan="#{fn:length(person.children12)}" rendered="#{childIdx == 0}"> <h:outputText value="#{person.father}"/> </rich:column> <rich:column> <h:outputText value="#{child}"/> </rich:column> </rich:subTable> </rich:dataTable>
-
2. Re: subTable rendering problem
jinpsu Feb 13, 2009 10:00 PM (in response to jinpsu)Thanks!! That worked great.