aspose file tools*
The moose likes JSF and the fly likes Displaying  the entire row in another datatable when the checkbox is checked Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Displaying  the entire row in another datatable when the checkbox is checked" Watch "Displaying  the entire row in another datatable when the checkbox is checked" New topic
Author

Displaying the entire row in another datatable when the checkbox is checked

sereesha kanugula
Greenhorn

Joined: Nov 06, 2008
Posts: 1
I have a jsf datatable which has 8 columns. I need to fetch a row completely when the check box corresponding to that row is checked. In the backing bean an object corresponding to a row is created. How can i display the entire row in another datatable.Please tell the sample code.
sujit suncert
Greenhorn

Joined: Nov 04, 2008
Posts: 6
Once you get the object in your backing bean ,construct a dynamic HTMLDataTable and render back to JSP page.

I don't have the code right away.
The code will be like this..
In your JSP :
<h:dataTable binding="#{dynamicTable.htmlTable}" />

in your backingbean
public HtmlDataTable getHtmlTable()
{
selectedRow = grid.getRowData();
htmlTable = new HtmlDataTable();
UIColumn col1 = new UIColumn();
col1.setId("colId_1");
HtmlOutputText someText1 = new HtmlOutputText();
......
.....
return htmlTable;
}

Hope I made it clear.
[ November 06, 2008: Message edited by: Bear Bibeault ]

-sujit(Never lose hope)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61064
    
  66

"sujit sun certified", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying the entire row in another datatable when the checkbox is checked