Hi,

I've had major issues with this because the ValidationTracker also reloads
old field values which in a non-ajax scenario is great, but in an ajax
scenario has caused it to clobber the proper field values. It has caused
many headaches and I think it really should be handled [better] by default
in tapestry.

I think I just came across a simple solution to the issue (that i was
specifically having anyway)


        @PageDetached
        void clearValidationTracker() {
                if (request.isXHR()) {
                        if (form.getDefaultTracker() != null) 
form.getDefaultTracker().clear();
                }
        }


In early testing it seems to do what I want.

I also wrote a dummy validation tracker which doesn't persist. But it means
there is no fallback on non-ajax (which was fine for me because my objects
were persisted anyway).

Side note: I've done quite a bit of Ajax and forms in tapestry and found in
general they are nasty together. Almost to the point where I want to dump
tapestry and just code it with javascript and something a lot dumber on the
server side. Then forms and loops and ajax and wowzers!. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Ajax-and-Validation-tp2431706p4485141.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to