Struts does this for you!

1.Turn on indexed property for your html:text field.
2. Have your form bean implement iterator. On Submit, Struts fires the setters. (Learned this from Ted H. way back, it's on his pages)
(Code example of how is Bean in DAO package on basicPortal.sf.net)

Also, when you do validation, Struts figures out what field in your row has the error.


hth,
.V


Savantraj, Chennamakal Subramanian wrote:
Hi All,
How do we handle the Indexed HTML objects in STRUTS.
For Example
<form >
<input type="text" name="myField">
<input type="text" name="myField">
<input type="text" name="myField">
</form>

In normal cases when we submit this form we will access the values
as String [] abc=request.getParameterValues("myField") ;.

How to do this using STRUTS form bean concept? If not what is the alternate
way?

Kindly give some ideas.

Best Regards
Savant

-------------------------------------------------------------------
This email is confidential and intended only for the use of the individual
or entity named above and may contain information that is privileged. If you
are not the intended recipient, you are notified that any dissemination,
distribution or copying of this email is strictly prohibited. If you have
received this email in error, please notify us immediately by return email
or telephone and destroy the original message. Thank you. - This mail is
sent via Sony Asia Pacific Mail Gateway. -------------------------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to