redirect user if session dead without clicking him at the page itself

Sabine Manaa <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <CA+UbgZZnVAp1_ZFHZtuCygsZTg_ZZLbH1cAMUODAgJmJKgEp8A@mail.gmail.com>
Hi,

is anyone having an idea for a solution of this problem:

I want that my seaside web app redirects the user to another page (login
page) if the session is "dead*". The special point I am looking for is:

This should happen ALSO if the user does NOT click on this page or does
something. Also if the user switches to another tab.

So, if he comes back to the browser/to my apps tab, he should see a message
"you have already been logged out".

I assume I have to periodically check if the session is alive and played
around with

html paragraph
        script:
            (html jQuery this load
                html: [ :r | "here check for session and if not there,
redirect"
                    (Array with: self currentPerson with: (self application
sessions includes: self session))
                        inspect ];
                interval: 30 seconds);
        with: [ html render: something].

but if the session is dead, the code "here check ..." is no longer executed.
I am not sure if this is the right idea...
Anyone already implemented something like this?

I am not looking for a redirect after clicking somewhere in the app, I have
this and it works fine.

Regards
Sabine

* I have read a little about "dead" sessions and know that they are
collected away at unpredictable time. With "dead" I mean that if the user
would click at the app, he would be transferred away.

_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.