• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dynamic columns in dataTable problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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">
<h:column>
<f:facet name="header">
<h:outputText value="#{idx.index}"/>
</f:facet>
</h:column>
</c:forEach>
</h:dataTable>

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?
Thanks.

Anton
 
reply
    Bookmark Topic Watch Topic
  • New Topic