• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

how to display list of objects in turn each object contains one more list using jsf2.0 datatable?

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I need to display list of objects in turn each object contains one more list using jsf2.0 datatable. I mean the requirement is like this.

StudentVO {
private string name;
private string failedSubjects[];
private string passedSubjects[];
}
Here i need to display list of students in datatable.

<h:dataTable id="studentID" var="studentVO" value="#{demandManagedBean.allStudentsList}" >
<h:column>
<f:facet name="header">
name
</f:facet>
</h:column>
<h:column>
<f:facet name="header">
failedSubjects // how to retrieve the these failed objects?
</f:facet>
</h:column>

</h:datatable>
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

prasad kakani wrote: failedSubjects // how to retrieve the these failed objects?


You can have a getter method in your class returning String of comma seperated failedSubjects or as desired in the output

This can be displayed on page using
 
prasad kakani
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi Nikhil,

i need to display these failed subjects values in another rows .how this can be done in jsf datatable?
 
Nikhil Padharia
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use nested tables, See the example here
And the rest expand collapse you can perform through javascript..
reply
    Bookmark Topic Watch Topic
  • New Topic