This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

List in backing bean  RSS feed

 
Sudharsan Ashwin
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have 5 input text(text box).
I have an arraylist field in backing bean.

How can I bind the input text with the arraylist in backing bean?

Is there an option?
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the input controls are to be displayed vertically, you can construct a dataTable and wrap the ArrayList in its DataModel (ListDataModel).

For horizontal layout, there's a "datagrid" control, but I forget if that's part of core JSF or if it's specific to the RichFaces extension framework.
 
suresh dasari
Ranch Hand
Posts: 121
Chrome Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can also use ui:repeat tag these can be used for both horizontal and vertical layout, but it is part of faclets
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suresh dasari wrote:you can also use ui:repeat tag these can be used for both horizontal and vertical layout, but it is part of faclets


But it's better not to, if you have a choice.
 
Sudharsan Ashwin
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok. Will try it
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!