On Wed, Feb 23, 2011 at 2:24 AM, Martin Strand <[email protected]> wrote: > On Mon, 07 Feb 2011 15:01:34 +0100, Massimo Lusetti <[email protected]> > wrote: > >> On Mon, Feb 7, 2011 at 9:17 AM, Howard Lewis Ship <[email protected]> >> wrote: >> >>> 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 >> >> This would be more then enough for me. > > > Stateless form validation by default would be great, I'm doing this right > now with PageValidationExceptions as described in this post: > http://www.mail-archive.com/[email protected]/msg38031.html > > In order for that to work with Tapestry's built-in validation mechanisms, > the Form component needs a small patch to throw a PageValidationException > whenever the ValidationTracker contains errors. > > All forms can then be completely stateless, and pages can also be made > cachable for a long time. > Tapestry's current default behaviour will redirect back to the same URL when > displaying form errors, which won't work very well unless you prevent client > side caching with appropriate HTTP headers. > > How do you guys feel about changing the non-ajax form behaviour to use the > PageValidationException approach above, and render a response directly in > case of form errors?
The only reason Tapestry doesn't do this (re-render the form as part of the event request when there are validation errors) currently is because I've been trying to leave the door open for Portlet support, and for Portlet support you need to fully separate event processing from rendering. Further, the use of ValidationException is a totally unwanted holdover from T4! What a mistake having normal control flow be based on exceptions. I'll be looking for a way to deprecate that in future releases. > > Martin > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- 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 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
