aspose file tools
The moose likes JSF and the fly likes how to increase size of collection without going into action Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "how to increase size of collection without going into action" Watch "how to increase size of collection without going into action" New topic
Author

how to increase size of collection without going into action

swapnil kataria
Ranch Hand

Joined: Feb 26, 2011
Posts: 64
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
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14475
    
    7

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218
You'd have to argue for this to be one of the best topic titles of all time though.
swapnil kataria
Ranch Hand

Joined: Feb 26, 2011
Posts: 64
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to increase size of collection without going into action
 
Similar Threads
problem with parse int method
Spring + JQuery dinamic list bind
validation on submit and not on other page actions?
Transferring data between two lists
can we use a java collection as hidden field in java