• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

text field validation

 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic