• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Nested datatables

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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">
<h:outputText value="System name"/>
</f:facet>
<h:outputText value="#{consumerItem.consumerName}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="File ID"/>
</f:facet>
<h:outputText value="#{importItem.fileID}"/>
</h:column>
</h:dataTable>
</h:dataTable>

Any help would be appreciated.

Regards,
Alfred Thomas
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bauke, I got it working now
 
permaculture is largely about replacing oil with people. And one tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic