• Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrieve Selected Row Data in JSF  RSS feed

 
Varshini Priya
Ranch Hand
Posts: 95
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSF page in which, I have created a html table(using 'table' )and displaying the row data using <ui:repeat> tag. I have a save button where, when I select a particular row, I want the entire row data data to be saved. When I try to select the particular row, Im unable to get the row data information in the manged Bean. <ui:repeat> does not have a binding attribute to bind it to a htmldatatable in the backing bean.

Can you please suggest how to acheive the same. Thanks in Advance
 
Nikhil Padharia
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use <h:dataTable> which will help you to create a table and it binds with the collection<objects>

And what do you want to save. I guess the table would be coming with the prepopulated data.
Do you want to make edit kinda functionality?
 
Varshini Priya
Ranch Hand
Posts: 95
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nikhil,

Thanks for your response. I have a requirement where I need to include nested datatable and I was able to achieve this by using the html table. Iam aware, that if I use the <h:datatable>, I can bind it with the collection<objects> in the backing bean and get the row data details. But since I am using the html table, I am not sure how to retrieve the row data.
 
Nikhil Padharia
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Varshini,

I think Tim helped you in your previous post and you were able create subtable using <h:datatable>, then why did you want to move to html table?
And in turn when the page renders it generates html code, So you must be able to do same things with <h:datatable>
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!