Inject the Form object and invoke the recordError() method. On Thu, Jun 19, 2008 at 7:47 AM, Marcelo Lotif <[EMAIL PROTECTED]> wrote: > Ok, but how can i return the error to the page with onValidateForm? > With the field validation method, i can throw a ValidationException in > case of failure, and then tapestry puts the error message on the top > of the form and decorates the bad field. But with onValidateForm i can > not do this. I tried to make a _form.recordError, but after it still > enters into the onSuccess method... > > 2008/6/19 Thiago H. de Paula Figueiredo <[EMAIL PROTECTED]>: >> Em Thu, 19 Jun 2008 10:43:49 -0300, Marcelo Lotif <[EMAIL PROTECTED]> >> escreveu: >> >>> I was using a tricky field by field validation on the server side(not >>> cross-validation) inside the BeanEditForm and i realize that to use >>> onValidateFromXXX you have to declare explicitly the id of the field >>> wrapping it with a parameter tag. I think this is a little verbose, >>> since i didn't have to change anything in the field, i just have to do >>> it because without that, the validation do not work. >> >> Use the form validation event, not the field validation one: >> Form.VALIDATE_FORM or onValidateForm(). >> >> Thiago >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > > -- > Atenciosamente, > > Marcelo Lotif > Programador Java e Tapestry > FIEC - Federação das Indústrias do Estado do Ceará > (85) 3477-5910 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
-- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]