This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have a problem while sending list of values from jsp to struts action class.My requirement is as follows.
I have table in jsp ,with in that i have one <tr> and within that i have 7 text fields(like <tr><td></td>......</tr>).And under this table i have two buttons "Add Row" and "Delete Row". If i click on "Add Row" button dynamically another row is added to this table.There is no problem on this.But if i enter values with in those fileds and when i submit the button the request goes to Action class.with in that i got only values from first row of the table.I didn't get the second row values.Is there anyway to get all the values from jsp to action class.
can someone suggest me on this.
It depends on the logic you have applied in your Action class.
Also how you are trying to display multiple rows in your jsp.
Normally for handling multiple Lists we use
inside the Iterator tag.
Setting indexed="true" sets an unique index to your scripting variable.
Its needs some explanation and right now I don't have much time.
Anyways I am trying for a simpler solution, just be patient.
I'll get back to you as soon as possible.
For any clarification reply back to me.
Take up one idea. Make that one idea your life; dream of it; think of it; live on that idea. Let the brain, the body, muscles, nerves, every part of your body be full of that idea, and just leave every other idea alone. This is the way to success.