RE: Help with ValidatorForm
I will typically (I don't know if this is an accepted convention) have two action-mappings: for example, StudentEdit and StudentEditSave that point at the same form-bean, and call the same Action class - the only difference being that StudentEditSave has validate=true and StudentEdit has validate=false. Of course, you also need to pass in a parameter to the Action to specify whether to load the edit jsp or save the record (or you could just write two separate Action classes). -Original Message- From: Wendy Smoak [mailto:Wendy.Smoak;asu.edu] Sent: Wednesday, November 06, 2002 4:17 PM To: 'Struts Users Mailing List' Subject: RE: Help with ValidatorForm Eddie wrote: Gotcha! Validate defaults to true :-O ... so set it to false in your populate action ;-) Will do... but how could you *ever* set it to true with a LookupDispatchAction? It's validating *before* the form is ever displayed for the first time. Of course it's going to fail! I am attempting to use a ValidationForm here. I haven't quite figured out the many options available-- any suggestions will be appreciated. -- Wendy Smoak http://sourceforge.net/projects/unidbtags -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Help with ValidatorForm
I typically go for seperate Action subclasses. The dispatch stuff works really well, but, having not found a way to have one function of the action not validate - and the rest validate - I have copped out to the quick fix :-(. I'd be most interested if someone knows how you can use a dispatch-type action and still use conditional validation. Perhaps invoking it yourself is the way to go (and just set validate=false)? I didn't think about that when I was sitting down setting convention ;-O It's not really that big of an issue to me though. Most modern IDEs, once you declare an interface or super-class will bring in methods that need to be overriden (abstract functions). Those methods it doesn't automatically add are just a couple of clicks off, and then - voila - you've got your method skelleton sitting there to flesh out. Wendy Smoak wrote: Eddie wrote: Gotcha! Validate defaults to true :-O ... so set it to false in your populate action ;-) Will do... but how could you *ever* set it to true with a LookupDispatchAction? It's validating *before* the form is ever displayed for the first time. Of course it's going to fail! I am attempting to use a ValidationForm here. I haven't quite figured out the many options available-- any suggestions will be appreciated. -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Help with ValidatorForm
Gotcha! Validate defaults to true :-O ... so set it to false in your populate action ;-) -- Eddie Bush -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
RE: Help with ValidatorForm
Eddie wrote: Gotcha! Validate defaults to true :-O ... so set it to false in your populate action ;-) Will do... but how could you *ever* set it to true with a LookupDispatchAction? It's validating *before* the form is ever displayed for the first time. Of course it's going to fail! I am attempting to use a ValidationForm here. I haven't quite figured out the many options available-- any suggestions will be appreciated. -- Wendy Smoak http://sourceforge.net/projects/unidbtags