This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 60810
    
  65

"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
 
Similar Threads
hi light a perticular row in jsf datatable
Problem with selecting checkboxes in subTable
How to fetch a row from a datatable?
Adding a Datatable as a row in another Datatable
calling action method on data table row click