• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Valiadation of Object parameters

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Have a form which has one parameter as an Object of a class along with the other regular parameters .

Parameter's like Name / Date ... etc can be validated, but
how to validate all the parameters of that object at the same time ??.
That object itself has parameters like Name/ Date to be validated also...


Thanks In advance,
Navi.
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can validate anything. Name, Date are objects too. the key thing is WHAT rule do you want to validate your object against, oh and also WHERE do you want to do the validation. perhaps describe your problem in more details you may be able to get some real help.
 
Navi Lock
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Thanks for responding.
I have a Request Form.The request has a parameter as
1)First Name -- Input Box
2)A customised class Object which has parameters like the First Name (multiple parameters).
I know how to validate the "First Name" in the "Validation.xml" file.
Need to know, if there is a way to do the same ( at the same time / in the same form request)in the validation .xml for the parameters of the object of the (2).

An example would be great..
Thanks,
-Navi
[ October 19, 2005: Message edited by: Navi Navi ]
 
Navi Lock
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cmon guys Help me out..........
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry, i was away for training...
in your case, you can define your form validation properties using the object.propertyName. for example, if your form prop is
<form-property name="requestParams" type="my.custom.Object"/> which contains a 'firstName' field.

your validation definition should be
<field property="requestParams.firstName" depends="..."...> ... </field>. everything else is business as usual.
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic