action interceptor

View: New views
1 Messages — Rating Filter:   Alert me  

action interceptor

by Francesco Vivoli :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've finally made up a simple method to distinguish ajax requests
from normal posts. The former have to append  a &jump=no on their
request paths.

The effect is then:
-an xml document is returned to the client, with the schema

<operation>
<errorMessage></errorMessage>
<content></content>
</operation>


-bind exception are catched and the errormessage is inserted
in the element above


Normal requests instead have the following behavior
-the view is redirected as specified in the controller (normally it's a true redirect, although it doesn't matter)
-bind exceptions are thrown, causing the error page to display.

The latter is not really ideal, I'd like binding errors to be redisplayed on the form
but beside appending the contents of the error in the url I've found no way of doing this.
Still if our way is to do asynchronous posts this should be enough.

F

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Atalaya-developer mailing list
Atalaya-developer@...
https://lists.sourceforge.net/lists/listinfo/atalaya-developer
LightInTheBox - Buy quality products at wholesale price!