Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Struts Validation - multiple input fields with same name

Status
Not open for further replies.

mdmohideen

Programmer
Mar 5, 2002
5
US
Hi,
I am developing a Struts Application. I have a form and the form has logic:iterate tag. On iterating, the many dynamic html text input controls with same name is created on the form.

<logic:iterate ...>
<html:text name=&quot;beanX&quot; property=&quot;name&quot;>
</logic:iterate>

.
.
<html:submit>

When i submit the form, the values in the input control should be validated(form validation). Please help me to do this.

Thanks,
Mohideen.
 
hi:
first, you should send a msg to the struts user group at tek-tips.com

second:
you need to define all your error messages in application.properties file.

third:
you need to turn on the validation flag to true in your *.tld file.

forth:
you need to have this tag: <html:errors> in your jsp page.

you may want to consider picking up a struts book by jason goodwill or the one by o'reilly.

~za~
You can't bring back a dead thread!
 
in your Action form, make sure your overrride the validate function.

~za~
You can't bring back a dead thread!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top