Scriptaculous backtracking

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Scriptaculous backtracking

Marc-78
Hi everybody!
Reading this group has been very interesting.

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.
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?
Thanx a lot.
Marc.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous backtracking

Lukas Renggli
> 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.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous backtracking

cbeler
In reply to this post by Marc-78

> 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.
> 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?
>  
This is not possible with the back button... as Ajax stuff only update a
part of the page without full reloading (the url doesn't change). Maybe
an internal mechanism could be done but it seems hard to me and anyway,
it won't work with the back button...

stupid question: is it possible to change/modify the url dynamically ?

Cédrick
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous backtracking

cbeler

>
>
> stupid question: is it possible to change/modify the url dynamically ?
>
I think I find responses here...
http://ajaxpatterns.org/Unique_URLs
interesting read... explainig the IFrame hack Lukas was talking about I
guess

As far as I understand, the url can be changed but forces the reload of
pages, or you can play with the fragment part... (but IE doesn't seems
to keep the history of fragments... sad...)

Cédrick
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous backtracking

Marc-78
In reply to this post by Lukas Renggli
> 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).

> 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.

All right thanks a lot for those explanations. I'm going to do this without ajax
then.
My first intention was to use Seaside to make all the ajax stuff easy to use and
keep the backtracking possibility. I actually thought Seaside was the
alternative to not-backtrackable-Ajax/Flash-websites but that'll be all right.
Best,
Marc

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous backtracking

Lukas Renggli
In reply to this post by cbeler
> I think I find responses here...
> http://ajaxpatterns.org/Unique_URLs
> interesting read... explainig the IFrame hack Lukas was talking about I
> guess

Yes, exactly. Interesting article, it basically describes what I saw
in the code of the Dojo framework. It is certainly doable, but I
wonder if it is worth the pain.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside