I plan to take another look at the patch ValidatorLookupDispatchAction. In the course of use I want to be able to turn validation off in a configuration and call the validation manually. In my current ValidatorLookupDispatchAction the only way to turn off validation is to override the execute method and bypass the call to the validaion. I imagine I could just have it look at the validation boolean that exists in the configuration now. But, that would mean that you couldn't decouple ActionForm based Validator validation from Action based Validator validation. It's either true for both or false for both. This can pose some problems. I plan on revisiting it once 1.1 is out and 1.2 is in the works.
Brandon Goodin Phase Web and Multimedia PO Box 85 Whitefish MT 59937 P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -----Original Message----- From: Raible, Matt [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 2:53 PM To: 'Brandon Goodin '; 'Struts Users Mailing List ' Subject: RE: Strange Validator Issue Brandon - thanks for the confirmation. S ince I'm doubting this patch will get into 1.1, I wrote a simple workaround with JavaScript (http://tinyurl.com/6cp9). Thanks, Matt -----Original Message----- From: Brandon Goodin To: Struts Users Mailing List Sent: 2/24/2003 1:59 PM Subject: RE: Strange Validator Issue This is a problem with using the LookupDispatchAction. Since the validation is mapped to the formBean name or the url it will always validate as long as you call the url. You could set validate to false and manually validate in the LookupDispatchAction or not depending on what method you call. I submitted a ValidatorLookupDispatchAction that allows you to map to a validation key that is compatible with the LookupDispatchAction. However validation happens in the Action class and not in the form. see this for details: http://www.mail-archive.com/[EMAIL PROTECTED]/msg12962.html http://www.mail-archive.com/[EMAIL PROTECTED]/msg12966.html Brandon Goodin Phase Web and Multimedia PO Box 85 Whitefish MT 59937 P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -----Original Message----- From: Matt Raible [mailto:[EMAIL PROTECTED] Sent: Monday, February 24, 2003 1:32 PM To: [EMAIL PROTECTED] Subject: Strange Validator Issue I'm using Struts 1.1 RC1 and I can't seem to figure this one out... Basically, when I click on a cancel button, the client-side validation is stopped, but not the server-side. Here's my cancel button: <html:cancel styleClass="button" property="action"> <bean:message key="button.cancel"/> </html:cancel> --> onclick="bCancel=true;" is added automagically by Struts when rendering. My form's action is "saveUser" which does specify validation="true" <action path="/saveUser" type="org.appfuse.webapp.action.UserAction" name="userForm" scope="session" input="editProfile" parameter="action" unknown="false" validate="true" > Since UserAction.java is a subclass of LookupDispatchAction, I should be able to map button.cancel to a "cancel" method, which I have done, but I never get to it. The Validator tries to validate the form anyway: DEBUG [Thread-5] RequestProcessor.processActionForm(367) | Storing ActionForm bean instance in scope 'session' under at tribute key 'userForm' DEBUG [Thread-5] RequestProcessor.processPopulate(808) | Populating bean properties from this request DEBUG [Thread-5] RequestProcessor.processValidate(935) | Validating input form properties DEBUG [Thread-5] PropertyMessageResources.getMessage(177) | getMessage(en_US,userForm.password) DEBUG [Thread-5] PropertyMessageResources.loadLocale(266) | loadLocale(en_US) DEBUG [Thread-5] PropertyMessageResources.getMessage(177) | getMessage(en_US,userForm.email) DEBUG [Thread-5] PropertyMessageResources.loadLocale(266) | loadLocale(en_US) DEBUG [Thread-5] RequestProcessor.processValidate(967) | Validation failed, returning to 'editProfile' DEBUG [Thread-5] TilesRequestProcessor.processForwardConfig(298) | processForwardConfig(/userProfile.do, false) Thanks, Matt P.S. I've written about my upgrade from Struts 1.1b3 to Struts 1.1rc1 at http://tinyurl.com/6cp9 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]