The easiest way to do this is to turn off automatic validation in your struts-config.xml and manually call validation in your desired methods. Something like:
ActionMessages errors = form.validate(mapping, request); if ( errors != null && errors.size() > 0 ) { LOG.warn("Errors detected!!"); return mapping.getInputForward(); } HTH, -ed On 11/30/06, Juan Espinosa <[EMAIL PROTECTED]> wrote:
hi to all, im having some problems with validation i have an action named RegisterCustomer with three methods and an object RegisterCustomer implements ModelDriven Customer customer = null; getModel showCustomerRegistrationView registerCustomer I want to know if could use validation in this way, telling validation to be used only in the medthod registercustomer and the results for this method validationOk - result registrationView validationFail - result registrationEnd I dont want to use the methods input and success, also in this action im using the interceptor Modeldriven the get the customer The customer is created upon a session parameter, if parameter is personal i create a Personal customer, if the parameter is enterprise i create a EnterpriseCustomer, both extends Customer class. This parameter class is loaded by another action SelectCustomer, that based in a pair of radio buttons load the parameter in the session. I had all working but i cant do the validation work Please help me !!!!! Regards Juan --------------------------------------------------------------------- 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]