[Seaside] Scriptaculous backtracking

Lukas Renggli renggli at gmail.com
Sat Jan 27 08:25:04 UTC 2007

> It may be stupid but I can't get a SUComponent to act with backtracking. The
> WACounter works perfectly fine but the SUCounterTest does not with me, even if
> I add the "self registerForBackTracking" line in the initialization.

Backtracking and AJAX doesn't work well together.

The first thing to notice is that hitting the back-button in your
browser will go back to the last full page refresh, and this is
probably much further back than a user would expect. There is not much
Seaside can do about this. (I know that some frameworks are using
IFRAMEs to emulate the back button on a finer level, but it is a very
ugly hack and it works in a few browsers only).

Second, for an AJAX request Seaside reuses the rendering context of
the last full request. This means that automatically generated IDs
will never conflict and continue from there. This also means that the
state of backtracked objects is always reset to the one of the first
full request. This is a bug, but since nobody complained up to know I
thought it doesn't matter. I can have a look at this ...

> I was actually interested in having a backtrackable drag-and-drop.
> How could I do? Is it impossible to catch the states because of the
> inner-Javascript?

Even if I fix (2), there is stil (1) that makes it impossible to use
the back-button for backtracking. However, iIf you do a full refresh
(a non-ajaxy thing) after the drag-and-drop operation that should be
easily possible.


Lukas Renggli

More information about the Seaside mailing list