• 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: 18715
71
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: 18715
71
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!