tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <hls...@gmail.com>
Subject For discussion: all form submissions via Ajax
Date Mon, 07 Feb 2011 08:17:35 GMT
Something I've been thinking about.  If we can sort out how to present
the exceptions page properly in an Ajax request (that's a separate
issue I'm thinking about), then it would be quite reasonable for a
Form to submit and, if there are exceptions but the user stays on the
same page, to simply send back details about fields and errors.  The
user could continue editing the form, correct the errors, and resubmit
using the same t:formdata as originally rendered (or introduced via
prior Ajax requests).

In the event of a Form submission that does not update a Zone, the
success response would be a JSON object with a redirectURL property
(something already supported in 5.2 and earlier).

The fallback behavior, when JavaScript was not available, would be the
same as today's behavior.

The advantage of this approach is twofold:

1) The inability of Tapestry to properly relate server-side validation
errors to client-side elements when the elements have been rendered
across multiple Ajax requests would be subverted
2) The ValidationTracker object would no longer have to reside in the
session, which in many applications can significantly defer the
creation of the session, improving throughput

Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210

To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org

View raw message