This content has been marked as final.
Show 4 replies
-
1. Re: Skip some columns in datatable
sergeysmirnov Feb 2, 2009 3:26 PM (in response to priestex)you cannot use c:if here because it evaluates the expression much before than ind is defined.
read this: http://www.ilikespam.com/blog/c:foreach-vs-ui:repeat-in-facelets -
2. Re: Skip some columns in datatable
priestex Feb 2, 2009 3:29 PM (in response to priestex)Go that, thanks for the clarification.
So is there some other way I can achieve what I want? -
3. Re: Skip some columns in datatable
priestex Feb 2, 2009 3:45 PM (in response to priestex)I got it to work by using the rendered attribute in the Columns:
<rich:dataTable value="#{reportTableView.rowList}" var="row" rendered="#{ind > 0}"> <rich:columns value="#{reportTableView.columns}" var="column" index="ind"> <c:if test="#{ind > 0}"> <h:outputText value="#{row.cellList[ind].displayValue}" /> </c:if> </rich:columns> </rich:dataTable>
-
4. Re: Skip some columns in datatable
priestex Feb 2, 2009 3:47 PM (in response to priestex)Sorry about the code in the previous post. Heres the correct one:
<rich:dataTable value="#{reportTableView.rowList}" var="row"> <rich:columns value="#{reportTableView.columns}" var="column" index="ind" rendered="#{ind > 0}"> <c:if test="#{ind > 0}"> <h:outputText value="#{row.cellList[ind].displayValue}" /> </c:if> </rich:columns> </rich:dataTable>