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 how to show inner datatables? 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 "how to show inner datatables?" Watch "how to show inner datatables?" New topic

how to show inner datatables?

Neil Blue

Joined: Jun 22, 2009
Posts: 1
I have a simple case where I would like to show a table with some columns containing collections of results. So I have tried using a nested datatables:

<h:dataTable value="#{entryHandler.entries}" var="entry">

<hutputText value="#{entry}" />

<h:dataTable id="inner1" value="#{entry.categories}" var="cat">
<hutputText value="#{cat.class}" />
<hutputText value="#{cat}" />


Where each entry instance has a set of categories.

But when I run this I get the inner cells as collection instances:

a class org.hibernate.collection.PersistentSet[New]
applications class org.hibernate.collection.PersistentSet[New]
applied class org.hibernate.collection.PersistentSet[New]
are class org.hibernate.collection.PersistentSet[New]
available class org.hibernate.collection.PersistentSet[New]

In this case each set only has one entry.

? Is there any way to get the inner table to render as a list?


Using JSF (myfaces) 1.2

It is sorta covered in the JavaRanch Style Guide.
subject: how to show inner datatables?
Similar Threads
Displaying 2D array using data tables
Doubt in JSF
nested h:datatable question
nesting h:panelGrid within h:dataTable
Creating List/Array of Managed Beans