gwt client session time out

2011-09-08 Thread Sanjay Jain India
I am using gwt 2.3 with gwtp framework.In this application I wan to
maintain a session time of 5 mins.This means if current user is not
doing up to 5 min and he comes after five min then on his first event/
action on screen a he should be be logged out. In gwt there is class
named Timer which can be used in this issues.But I am not getting how
to recognize action of user on the screen.I did google on it,  found
the code for gwt-ext.Below is the code of gwt-ext

Ext.get(“pagePanel”).addListener(“click”, new EventCallback() {
@Override public void execute(EventObject e) {
 MessageBox.alert(“On Mouse Click”); }
 }
);

Ext.get(“pagePanel”).addListener(“keydown”, new EventCallback() {

@Override public void execute(EventObject e) {
MessageBox.alert(“On Key Press Click”); }
});

In above code tag in working properly so I am attaching link from
where I got this code.here

Same type of code I am looking in gwt.If there any other better way to
do this then please let me know.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client session

2010-07-15 Thread Stefan Bachert
Hi,

I am not sure what you mean with client side sessions?

Do you mean to pass the HttpSession (maybe just the id) to the client
side?

But for what reason? It is already there. Either due to url-rewriting
or by cookie.


Stefan Bachert
http://gwtworld.de


On 9 Jul., 19:48, mk munna.kaka.ch...@gmail.com wrote:
 How to implement a client side session ( and any best practices to
 implement them).
 Is it to just create a static variable ?

 How do two different MVP widgets share MODEL data (i.e. user input
 data).

 How do two different MVP widgets share VIEW data ( for example if
 display of one widget is dependent on mouse click location of second
 widget, than how do two widgets share view information i.e. mouse
 click location).

 Again, all widgets are designed using MVP and send events using
 EventBus.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



RE: Client session

2010-07-15 Thread Feldman, Nir (48Upper)
Regarding the MODEL, you should not have static variables, Instead you should 
have a singleton Service in the client side.
Create UserService Interface with one method 
getLoggedInUserInfo(AsyncCallBackUserInfo).
Whenever you need it call this interface. In the implementation you should have 
cache so only the first time will ask data from the server.
This way you will avoid initialization sequences of static models in the client 
and only once the data is required it will be fetched.
Sharing of data is threw the bus. You should have your display expose 
mouseClickedEvent. The presenter should capture it and fire it to the bus.
The secondPresenter should get the event and notify the second display on 
whatever required.

Hope it helps

Nir

-Original Message-
From: google-web-toolkit@googlegroups.com 
[mailto:google-web-tool...@googlegroups.com] On Behalf Of Stefan Bachert
Sent: Thursday, July 15, 2010 6:02 PM
To: Google Web Toolkit
Subject: Re: Client session

Hi,

I am not sure what you mean with client side sessions?

Do you mean to pass the HttpSession (maybe just the id) to the client
side?

But for what reason? It is already there. Either due to url-rewriting
or by cookie.


Stefan Bachert
http://gwtworld.de


On 9 Jul., 19:48, mk munna.kaka.ch...@gmail.com wrote:
 How to implement a client side session ( and any best practices to
 implement them).
 Is it to just create a static variable ?

 How do two different MVP widgets share MODEL data (i.e. user input
 data).

 How do two different MVP widgets share VIEW data ( for example if
 display of one widget is dependent on mouse click location of second
 widget, than how do two widgets share view information i.e. mouse
 click location).

 Again, all widgets are designed using MVP and send events using
 EventBus.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client session

2010-07-15 Thread munna kaka
You wrote that

On Thu, Jul 15, 2010 at 11:36 AM, Feldman, Nir (48Upper) nir.feld...@hp.com
 wrote:

 Sharing of data is threw the bus. You should have your display expose
 mouseClickedEvent. The presenter should capture it and fire it to the bus.
 The secondPresenter should get the event and notify the second display on
 whatever required.



Plz let me know that how first presenter can send data (say user clicked
item id in first display or any data) to second presenter?

Above is the question, I really need answer..thanks in advance...




  -Original Message-
 From: google-web-toolkit@googlegroups.com [mailto:
 google-web-tool...@googlegroups.com] On Behalf Of Stefan Bachert
 Sent: Thursday, July 15, 2010 6:02 PM
 To: Google Web Toolkit
 Subject: Re: Client session

 Hi,

 I am not sure what you mean with client side sessions?

 Do you mean to pass the HttpSession (maybe just the id) to the client
 side?

 But for what reason? It is already there. Either due to url-rewriting
 or by cookie.


 Stefan Bachert
 http://gwtworld.de


 On 9 Jul., 19:48, mk munna.kaka.ch...@gmail.com wrote:
  How to implement a client side session ( and any best practices to
  implement them).
  Is it to just create a static variable ?
 
  How do two different MVP widgets share MODEL data (i.e. user input
  data).
 
  How do two different MVP widgets share VIEW data ( for example if
  display of one widget is dependent on mouse click location of second
  widget, than how do two widgets share view information i.e. mouse
  click location).
 
  Again, all widgets are designed using MVP and send events using
  EventBus.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client session

2010-07-15 Thread Prashant Hegde
The way I would do is to define a application event (eg. 
LocationEventLocationHandler)  handler encapsulating whatever data 
(ex. co ordinates) that you need to send and fire the event. First 
presenter fires the event when the mouse is clicked. Second Presenter 
handles the event and takes appropriate action.


Regards
Prashant


On 16-07-2010 03:41, munna kaka wrote:

You wrote that

On Thu, Jul 15, 2010 at 11:36 AM, Feldman, Nir (48Upper) 
nir.feld...@hp.com mailto:nir.feld...@hp.com wrote:


Sharing of data is threw the bus. You should have your display
expose mouseClickedEvent. The presenter should capture it and fire
it to the bus.
The secondPresenter should get the event and notify the second
display on whatever required.

Plz let me know that how first presenter can send data (say user 
clicked item id in first display or any data) to second presenter?

Above is the question, I really need answer..thanks in advance...

-Original Message-
From: google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com
[mailto:google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com] On Behalf Of Stefan
Bachert
Sent: Thursday, July 15, 2010 6:02 PM
To: Google Web Toolkit
Subject: Re: Client session

Hi,

I am not sure what you mean with client side sessions?

Do you mean to pass the HttpSession (maybe just the id) to the client
side?

But for what reason? It is already there. Either due to url-rewriting
or by cookie.


Stefan Bachert
http://gwtworld.de http://gwtworld.de/


On 9 Jul., 19:48, mk munna.kaka.ch...@gmail.com
mailto:munna.kaka.ch...@gmail.com wrote:
 How to implement a client side session ( and any best practices to
 implement them).
 Is it to just create a static variable ?

 How do two different MVP widgets share MODEL data (i.e. user input
 data).

 How do two different MVP widgets share VIEW data ( for example if
 display of one widget is dependent on mouse click location of second
 widget, than how do two widgets share view information i.e. mouse
 click location).

 Again, all widgets are designed using MVP and send events using
 EventBus.

--
You received this message because you are subscribed to the Google
Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google
Groups Google Web Toolkit group.
To post to this group, send email to
google-web-toolkit@googlegroups.com
mailto:google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com
mailto:google-web-toolkit%2bunsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google 
Groups Google Web Toolkit group.

To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups Google 
Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client session

2010-07-14 Thread Peter Simun
And what about using DI (gwt-gin) for injecting the client session?
Anyway, the static client session is perfectly ok for the small
application.
You can inspire also in acris-security implementation:
http://code.google.com/p/acris/wiki/SecurityClient#Client_session

Peter

On 12. Júl, 20:51 h., mk munna.kaka.ch...@gmail.com wrote:
 I am sure many experts out there had already found solution to below.
 Thus please respond to original question.

 On Jul 9, 11:48 am, mk munna.kaka.ch...@gmail.com wrote:

  How to implement a client side session ( and any best practices to
  implement them).
  Is it to just create a static variable ?

  How do two different MVP widgets share MODEL data (i.e. user input
  data).

  How do two different MVP widgets share VIEW data ( for example if
  display of one widget is dependent on mouse click location of second
  widget, than how do two widgets share view information i.e. mouse
  click location).

  Again, all widgets are designed using MVP and send events using
  EventBus.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Client session

2010-07-12 Thread mk
How to implement a client side session ( and any best practices to
implement them).
Is it to just create a static variable ?

How do two different MVP widgets share MODEL data (i.e. user input
data).

How do two different MVP widgets share VIEW data ( for example if
display of one widget is dependent on mouse click location of second
widget, than how do two widgets share view information i.e. mouse
click location).

Again, all widgets are designed using MVP and send events using
EventBus.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client session

2010-07-12 Thread mk
I am sure many experts out there had already found solution to below.
Thus please respond to original question.

On Jul 9, 11:48 am, mk munna.kaka.ch...@gmail.com wrote:
 How to implement a client side session ( and any best practices to
 implement them).
 Is it to just create a static variable ?

 How do two different MVP widgets share MODEL data (i.e. user input
 data).

 How do two different MVP widgets share VIEW data ( for example if
 display of one widget is dependent on mouse click location of second
 widget, than how do two widgets share view information i.e. mouse
 click location).

 Again, all widgets are designed using MVP and send events using
 EventBus.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Client Session Timeout

2010-06-16 Thread Paul Grenyer
Hi All

We have an application that makes regular RPC calls, on a timer, to
the client. This has the side effect of the user's session never
expiring. Because of the sensitive nature of the data we're handling
in our application, we need the user's session to timeout.

How can this be done?

-- 
Thanks
Paul

Paul Grenyer
e: paul.gren...@gmail.com
b: paulgrenyer.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Session Timeout

2010-06-16 Thread jhulford
The session interface has the method invalidate() in it to manually
force the session to expire.  You can add some sort of filter in your
server side RPC processes that uses whatever heuristic you need to
determine when to time out the session and just do it manually.

On Jun 16, 8:34 am, Paul Grenyer paul.gren...@gmail.com wrote:
 Hi All

 We have an application that makes regular RPC calls, on a timer, to
 the client. This has the side effect of the user's session never
 expiring. Because of the sensitive nature of the data we're handling
 in our application, we need the user's session to timeout.

 How can this be done?

 --
 Thanks
 Paul

 Paul Grenyer
 e: paul.gren...@gmail.com
 b: paulgrenyer.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Client Session Timeout

2010-06-16 Thread Mike Jiang
Except for that, you can set a fixed timeout in your app's web.xml.
For instance,

  session-config
session-timeout15/session-timeout
  /session-config
Here the time is in minute.

Mike J.



On Wed, Jun 16, 2010 at 9:44 AM, jhulford jhulf...@gmail.com wrote:

 The session interface has the method invalidate() in it to manually
 force the session to expire.  You can add some sort of filter in your
 server side RPC processes that uses whatever heuristic you need to
 determine when to time out the session and just do it manually.

 On Jun 16, 8:34 am, Paul Grenyer paul.gren...@gmail.com wrote:
  Hi All
 
  We have an application that makes regular RPC calls, on a timer, to
  the client. This has the side effect of the user's session never
  expiring. Because of the sensitive nature of the data we're handling
  in our application, we need the user's session to timeout.
 
  How can this be done?
 
  --
  Thanks
  Paul
 
  Paul Grenyer
  e: paul.gren...@gmail.com
  b: paulgrenyer.blogspot.com

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.