Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Custom Widget with Session Timeout
Custom Widget with Session Timeout [message #1480525] Thu, 20 November 2014 08:54 Go to next message
Magnus Konze is currently offline Magnus KonzeFriend
Messages: 10
Registered: November 2014
Junior Member
Hi,

I'd like to implement a widget which shows the remaining time after which the session expires if the user is inactive. (For example a label showing "You are getting logged off in 5 minutes" which counts down every minute.)
Of course the widgets timer should be reseted after each user activity.

Currently i'm thinking about the following approach.

The idea is to write a custom widget. The label text is updated by JavaScript, so there shoudn't be any server-client-communication, which resets the server session timeout.

A MessageFilter registered on the ApplicationContext could call a reset-method on the RemoteObject of my Custom Widget.

I have only basic JavaScript knowledge and have never written a custom widget, so any hints on expected problems or advices for a better solution a very much appreciated.
Re: Custom Widget with Session Timeout [message #1480942 is a reply to message #1480525] Thu, 20 November 2014 16:16 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
Hi, have you seen this post?

https://www.eclipse.org/rap/developers-guide/devguide.php?topic=server-push.html&version=2.3

You don't need JS or a custom widget to do this.
Re: Custom Widget with Session Timeout [message #1481822 is a reply to message #1480942] Fri, 21 November 2014 08:49 Go to previous messageGo to next message
Magnus Konze is currently offline Magnus KonzeFriend
Messages: 10
Registered: November 2014
Junior Member
Thanks for the link. I didn't know about the ServerPushSession.
Interesting, but i'm not sure if it is suitable for my problem.

If i'm updating my Label ("you are getting logged of in x minutes") every minute via the ServerPushSession, doesn't this reset the session-timeout?
Re: Custom Widget with Session Timeout [message #1482088 is a reply to message #1481822] Fri, 21 November 2014 13:27 Go to previous message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
You are right, I tested it myself.
Maybe someone more competent could help you to find the best approach.
Previous Topic:OSGI Event on RAP not working
Next Topic:RAP and Cross Site Request Forgery attacks
Goto Forum:
  


Current Time: Fri Feb 21 13:22:43 GMT 2020

Powered by FUDForum. Page generated in 0.01526 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top