GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes text field validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "text field validation" Watch "text field validation" New topic
Author

text field validation

Deeps Mistry
Ranch Hand

Joined: Jan 31, 2009
Posts: 189
Hi,

I am using struts 1.1 .

I have 5 columns(Product Description Nett Price (W/o Tax) Quantity UOM Nett Weight ) and 10 rows in my table. I am generating the text boxes using DynaActionForm and <logic:iterate>

I want to validate the columns as follows:
If i enter anything in Product Description, then the remaining columns must not be empty.

I have tried the following but the problem with it is that it is validating only the first row.

struts-config.xml:



AddPOBean:

jsp:


generated html code:



What should i do?
Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
ids are singular. You can not have multiple elements with the same id.

Also you will have to loop through each row of elements and check it. One general if statement will not cover all of the elements.

Eric
 
GeeCON Prague 2014
 
subject: text field validation