Hi,
All my forms extend ValidatorForm, should i change it to DynaValidatorForm?
is this is the only option?
Thanks and Regards
O. Subramaniam
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
Joe Germuska <[EMAIL PROTECTED]>
02/11/2004 09:37 AM
|
|
At 8:51 AM +0530 2/11/04, [EMAIL PROTECTED] wrote:
>Hi Guys,
>
> I've three screens assume that they are add, modify and view
>screens. I would like to use same form for all the screens.
>But the problem is, each one of the screens has a different set of
>validation rules, how do i achieve this? Somewhere, i read that it
>is possible to use action path names in validation.xml. Can anyone
>post a sample validation.xml?
Basically, you just use a different form class in the struts-config:
http://jakarta.apache.org/struts/api/org/apache/struts/validator/DynaValidatorActionForm.html
When this class's validate method is called, it uses that action's
path instead of form's name.
Joe
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Imagine if every Thursday your shoes exploded if you tied them
the usual way. This happens to us all the time with computers, and
nobody thinks of complaining."
-- Jef Raskin
ForwardSourceID:NT0000251A
DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]