This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
How can I display such an object in datatable? I am out of clue how to display List of Object B.
Thanks.
Harish Govind
Greenhorn
Joined: Nov 06, 2008
Posts: 8
posted
0
Hey Yasir could you please more specific on your requirement. Do you want to display total list A as a datamodel (in which list b also exists) or just display list A elements excluding list B from it and show list B as datamodel whenever any action is done on user.
Harish Govind
Yasir Qureshi
Greenhorn
Joined: Apr 26, 2006
Posts: 24
posted
0
I want to display list A and also list B which is contained by list A, in the same data table.
Marius Snyman
Greenhorn
Joined: May 04, 2006
Posts: 14
posted
0
Originally posted by Yasir Qureshi: I want to display list A and also list B which is contained by list A, in the same data table.
In you backing add two HTMLDatatables private HtmlDataTable dataTableA; private HtmlDataTable dataTableB; private List ListA ; private List ListB ;
On your web page link: <h:dataTable id="itemsA" bindings="#{bbean.dataTableA}" value="bbean.ListA"> <h:dataTable id="itemsB" bindings="#{bbean.dataTableB}" value="bbean.ListB" rendered="false">
Add the entries of ListA to dataTableA Add A commandLink to a column in dataTableA which calls a method in the backing bean: