• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to increase size of collection without going into action  RSS feed

 
swapnil kataria
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my JSP page a List of Users is iterating, suppose initially its size is 1,
there is a button "add more",
clicking on this button I want to add one more user in to list,

for this i have to go to action, to add one more element in to list

means if I have to add 4 users, i will have to goto action 4 times,

Is there is a way to handle this,
or any other solution,

please help!
[Dave - removed shouting]
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could always put a second form on the page that contains just that button and an input control that supplies the number of new rows you want to add.

You probably don't want to do that in the main form, since the JSF validators will insist that all the other data in the form should be valid as well, even if you don't need them to be valid at that time.
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd have to argue for this to be one of the best topic titles of all time though.
 
swapnil kataria
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brendan Healey wrote:You'd have to argue for this to be one of the best topic titles of all time though.


hello Brendan, I could not understand what do you want to say,
do you have any idea about solution of above mentioned problem.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!