On Wed, 2007-21-03 at 01:18 +0100, Christopher Arndt wrote:
> Jorge Godoy schrieb:
> > iain duncan <[EMAIL PROTECTED]> writes:
> > 
> >> Ok, still more widget questions! This one is definitely not in the
> >> remote form tutorial and I couldn't figure out from the validator docs
> >> and the errorhandler docs how to do it.
> >>
> >> Is it possible to use the @validator @error_handler technique of kicking
> >> back a form submission with a remote form? Right now, if I send a remote
> >> form submission to a method using @validate, errors just get an error
> >> pop up, which I assume must come from the ajax.js site.
> >>
> >> What I'd like is for the remote form to send it's stuff and if the
> >> validator fails, to rebuild itself the way normal forms with validators
> >> do.
> > 
> > I haven't tested it but your question doesn't make much sense.  You're in an
> > asynchronous request, so there's nothing that will make the browser open a 
> > new
> > page after all that's the idea of 'asynchronous'. 
> > 
> > What you can do is enhancing your answer and deciding what to do based on 
> > some
> > flag that is returned with your data.  Then you can code something that will
> > redirect your browser to the correct page or inform your user of the error 
> > in
> > a better way (as there was no change in the form you don't need to fill it
> > again...). 
> 
> I guess what he wants is to display error messages next to the fields that had
> errors just like widget-based forms in a synchronous request-response cycle
> environment do. I would be hard to implement all this in java script in a
> generic way.

That was indeed what I meant. Should that not be possible if the whole
cycle uses ajax calls? 

Iain



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to