File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Make it so: Java DB Connections & Transactions this week in the JDBC 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
It's not a secret anymore!