This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSF and the fly likes Dynamic columns in dataTable problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamic columns in dataTable problem" Watch "Dynamic columns in dataTable problem" New topic

Dynamic columns in dataTable problem

Anton de Vries

Joined: Aug 19, 2009
Posts: 1
Hello all,

I am trying to add columns to a dataTable using a forEach loop. Here is the code i've made

<h:dataTable value="#{somelist}" var="assignment">
<!--some normal columns-->

<!--columns that don't work-->
<c:forEach begin="1" end="31" step="1" varStatus="idx">
<f:facet name="header">
<hutputText value="#{idx.index}"/>

In the page I see the colums but with a empty header. Can anybody explain why this is not working?
I am using myfaces-1.2.7 and tomcat 6.0.

can anybody show me what i'm doing wrong?

Have you checked out Aspose?
subject: Dynamic columns in dataTable problem
jQuery in Action, 3rd edition