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
Author

how to show inner datatables?

Neil Blue
Greenhorn

Joined: Jun 22, 2009
Posts: 1
Hello,
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">

<h:column>
<hutputText value="#{entry}" />
</h:column>


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

</h:dataTable>

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?

Thanks
Neil

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