• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading Ids for fields

 
Srikanth Nittala
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am a JSF/Facelets novice. I got a question regarding the id fields.

I have a PanelGrid that gets displayed using the facelets <ui:repeat> tag based on an arraylist of 'User' objects that contain User's Secret Questions and Answers( for User's progile). In the panel grid, I paint dropdown(for questions) and text boxes(answers) for each User object using <ui:repeat>. Now since these Question dropdowns and answer Textboxes are painted dynamically based on the number of values in the arraylist, how do i give seperate Ids to each of the fields? I have a backing bean that holds attributes(ids) to these field Ids.
How do we read them to save values into the DB?

Please help.

Thanks,
Srikanth
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inside the action method just access the same list as you feeded to ui:repeat. JSF has already set the updated values for you.
 
Srikanth Nittala
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the information. I am able to see the changed values now.

-Srikanth
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!