File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply 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: 56157
    
  13

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Displaying the entire row in another datatable when the checkbox is checked
 
Similar Threads
calling action method on data table row click
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