On Wed, Apr 22, 2009 at 7:04 PM, Joost Schouten (mailing lists) <
joost...@jsportal.com> wrote:

> On Thu, Apr 23, 2009 at 8:38 AM, Geoffrey Wiseman
> <geoffrey.wise...@gmail.com> wrote:
> > I wasn't sure if Tapestry did any magic under the covers to work with
> > server-side validation and ajax form submits.  I did a quick experiment
> and
> > it doesn't seem to:
> >
> >   - Create a form, give it a zone to do ajax submit.
> >   - Create an onValidateForm method, throw a ValidationException from it.
> >   - Load up the application.  Submit the form.
> >   - The zone gets updated, no validation messages appear.
>
> I use validation and ajax a lot and it works (quite) well for me. I
> just replicated what you described and it works. I assume you might
> not have the <t:errors/> component in the block that gets loaded in
> the zone, nor record the error to one of the Fields.


That's correct, t:errors isn't in the zone.  The zone isn't in the form.  It
possibly could be, I hadn't thought about that option.


> This way, no
> visual feedback is given. If your setup doesn't work well with placing
> the <t:errors/> in the block that gets reloaded, you could consider
> placing it in a zone by itself and update multiple zones on the one
> form submit by returning a MultiZoneUpdate from your
> EventConstants.SUCCESS action. (haven't tried this btw)
>

That's a 5.1.X option, IIRC; I'm still on 5.0.x, but it's good to know that
a zone containing the errors in the form would render as desired.  Now if I
could get an errors component to link to a form it's not in,  I'd have even
more flex.  That said, most of the above I can live with, it's really the
weird error persistence thing that was worrisome to me.

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/

Reply via email to