• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
sereesha kanugula
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sujit sun certified", please check your private messages for an important administrative matter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic