Sorry, I assumed you were using S1, I don't know how for s2.
On 11/30/06, Juan Espinosa <[EMAIL PROTECTED]> wrote:
Im using struts2, doing in this way works in struts2 In struts2 i have the object mapping and form....?? -----Mensaje original----- De: Ed Griebel [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 30 de Noviembre de 2006 10:51 a.m. Para: Struts Users Mailing List Asunto: Re: VALIDATION 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] --------------------------------------------------------------------- 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]