aspose file tools*
The moose likes JSF and the fly likes how to display list of objects in turn each object contains one more list using jsf2.0 datatable? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "how to display list of objects in turn each object contains one more list using jsf2.0 datatable?" Watch "how to display list of objects in turn each object contains one more list using jsf2.0 datatable?" New topic
Author

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

prasad kakani
Ranch Hand

Joined: Jul 15, 2008
Posts: 59
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>
Nikhil Padharia
Ranch Hand

Joined: Apr 19, 2012
Posts: 37
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

Joined: Jul 15, 2008
Posts: 59

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

Joined: Apr 19, 2012
Posts: 37
You can use nested tables, See the example here
And the rest expand collapse you can perform through javascript..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to display list of objects in turn each object contains one more list using jsf2.0 datatable?