This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Dynamic Columns problem in datatable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamic Columns problem in datatable" Watch "Dynamic Columns problem in datatable" New topic

Dynamic Columns problem in datatable

Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572

I have a scenerio where i like to display a data table in which 4 columns are those which i already know whereas some other columns are dynamic and i need to display them dynamically. I have written following code:

Here the first and last columns are rendered successfully whereas t:columns tag is not rendered. i don't know why

I have checked the list i have provided to t:columns tag has elements in it as expected. My JSF page doesn't throw any exception and doesn't render the tag. i am not able debug it also.

Can anybody help
Stephen Connolly

Joined: Mar 07, 2006
Posts: 1
OK, to my understanding, that's not how a dataTable works... which would explain why it doesn't ;)

If you are lucky enough to be developing against JSF 1.2, the following should work.

Note: JSF 1.2 is needed for two reasons: 1. Unified EL and 2. Fixed implementation of c:forEach. Thus my example will work in glassfish!

Darrel Su

Joined: Sep 09, 2007
Posts: 4
I also have the same problem.
c:repeat does not work either.
t:columns seems not to render embedded list.
Anyone gets solution?
I agree. Here's the link:
subject: Dynamic Columns problem in datatable
Similar Threads
Help with MyFaces dataTable in portlet
Property can't be found that's definitely there!
Question on how to sort tomahawk datatable
strachable columns in jsf
MyFaces Data Table didn't work