[Seaside] Seaside sessions and ajax

Lukas Renggli renggli at gmail.com
Fri May 18 17:17:37 UTC 2007

> I found that it handles differently, not like a regular page navigation.
> For instance - continuation is not changing.

Yes, AJAX handlers are executed (rendered) exactly the same way as a
callback would. This means it always evaluates the continuation of the
full page refresh, leading to several very subtle problems.

> And i have a problem with sessions: when session expires, by default
> we redirect page to show login page. But with ajax its just returns an
> empty result, rendering updated page parts empty. How i can handle
> session expiration with ajax correctly?

It does not return an empty result, but an error response. As you can
see in WAApplication>>#handleExpiredRequest: and its super
implementation WARegistry>>#handleExpiredRequest:. This allows you to
catch this case in the error handler #onFailure: of SUAjax (for one
particular AJAX handler) or SUResponders (for all AJAX handlers).

> Also, i would like to make continuations updating for ajax, so any
> user action regardless ajaxed or not with have new continuation id.
> How this can be done?

This is a thing on the to-do list of Seaside 2.8. Another related
problem is that the backtracking doesn't work (mildly expressed) with
AJAX. If you or anybody else has an idea about a possible solution to
these problem I would be glad to hear. So far I couldn't come up with
a nice solution myself ...


Lukas Renggli

More information about the seaside mailing list