• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Validate Arrays in Validator FrameWork

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

i have a requirement where the user can dynamically add textboxes.
i have captured the user given values for these textboxes using a String array in the actionForm.

the form is shown below.....

public class ObligationMaintananceActionForm extends ValidatorForm {
private String []name= null;
}

the values are being set into the array in the form properly.

now, if i want to validate the values populated in the String array, how should i go about?

Awaiting an early reply. I am i need of it very badly.

-Amith
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe the validation.xml file supports indexed properties. So, you'd do something like this:

There's alot of information on the Struts website about indexed, nested, and mapped properties. And since the Validator library uses the same library to resolve properties as Struts does, I'm sure they'd be the same. (They both use the Commons BeanUtils library.)

Hope that helps -- happy hunting.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic