- AjaxResponseAppender
- AjaxSubmitButton
- AjaxUpdateContainer
- Application.handleException
- Application.handleSessionRestorationErrorInContext
Notifications
Often it is the case that you want to be able to check for any error conditions that occurred
during an Ajax request and trigger the update of a notification area if there was a problem.
AjaxResponseAppender provides an API to perform these kinds of checks on all ajax requests.
- Look at NotificationAjaxResponseAppender to see the response appender.
- Look at Application's constructor to see how to register it.
- Look at AjaxHeaderFooter and NotificationsList to see how they are rendered.
Exceptions
You want to handle exceptions differently for Ajax than non-Ajax updates. In an Ajax update,
you can't just generate an exception page, because you're typically performing a partial update. Instead
one approach is to just render the exception error message inline with the response, as demonstrated here.
- Look at Application.handleException to see how this is implemented.
Session Timeouts
Just like exceptions, session notifications should be handled with a different technique. Rather than
render the session timeout page, you can generate a redirect with Javascript in response to a session
timeout.
- Look at Application.handleSessionRestorationErrorInContext to see how this is implemented.
Click "Generate Session Timeout" one more time to see how Ajax session timeouts can be handled.