I have a jsp where i need to enter multiple items, each item has four properties. I don't know how many items i will need to enter before the page is created and I want to have a page where I initially provide the user with 5 input rows and if the user wishes to add more than five items, they can press a button wich then adds a new row for input of an item. So after pressing the button they would have 6 rows for inputting items and this process can be repeated.
The code I have so far is, where counter is set to 5 initially.
I'd be greatful If you could help me with this.
Joined: May 05, 2006
I can think of two options when the user attempts to add a new row:
The first option would be to submit the form to an action that increments the size of the list, and then forwards back to the same page. This should be pretty easy to implement, but would cause the screen to reload every time they add a row.
Let me know if you have any questions about either method.