• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested datatables  RSS feed

 
Alfred C. Thomas
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

Can anyone please tell me whether it is possible to nest JSF datatables. What I have is a collection of objects containing another collection in a parent/child relationship. When I try to nest the tables however I get either no table or an exception. The code is tried is as follows:

<h:dataTable id="consumerTable" value="#{StatisticsBean.consumerList}" var="consumerItem">
<h:dataTable id="importTable" value="#{consumerItem.dataImports}" var="importItem">

<h:column>
<f:facet name="header">
<hutputText value="System name"/>
</f:facet>
<hutputText value="#{consumerItem.consumerName}"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="File ID"/>
</f:facet>
<hutputText value="#{importItem.fileID}"/>
</h:column>
</h:dataTable>
</h:dataTable>

Any help would be appreciated.

Regards,
Alfred Thomas
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the nested datatable in a h:column. Check http://balusc.xs4all.nl/srv/dev-jep-dat.html how to use datatables.
 
Alfred C. Thomas
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bauke, I got it working now
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!