Re: Session Timeout Popup

2010-04-27 Thread StrongSteve
Thanks for your quick reply.

I am just wondering if there is no easier way to do this.

I mean, adding an exception to all server methods and checking it in
every onFailure block does not seem so pratical to me.

There should be an easier way!

Thanks in Advance!
Stefan

On Apr 26, 5:08 pm, kozura koz...@gmail.com wrote:
 Easiest is probably to just create an exception for session timeout,
 and throw it on the server side after you check for session validity.
 Then put a standard method in your onFailure call to popup the error
 when that exception is received.

 On Apr 26, 8:25 am,StrongSteveswe.sta...@gmail.com wrote:



  Hi Everbody,

  I am looking for a way to implement a session timeout behaviour into
  my GWT application.

  On the ServerSide I have a session listener that sets the value for
  the session timeout as soon as a new session is being created.

  Now what I would like to do is to present the user a popup as soon as
  the session has experied.
  This does not have to happen automatically. It is also ok to show this
  popup as soon as a new request is addressed against the server.

  Now I am looking for some best practices on how to deal with this
  problem.
  I believe some of you have already dealt with similar problem! ;)

  Thanks in Advance for your help!

  Greetings
  Stefan

 --
 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 
 athttp://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: Session Timeout Popup

2010-04-27 Thread nacho
How do redirect to another page in GWT?

On 27 abr, 06:29, Sripathi Krishnan sripathikrish...@gmail.com
wrote:
 Just have a custom class the extends AsyncCallback, like below, and mandate
 that everybody uses it instead of directly using AsyncCallback.

 public abstract class MyAsyncCallbackT implements AsyncCallbackT {

       public void onFailure(Throwable caught) {
               if(caught instanceof AuthenticationException) {
                     //redirect to login page
               }
               else if(caught instanceof AuthorizationException) {
                     //tell the user he doesn't have rights to perform this
 operation
               }

               try {
                       //allow your application to handle the exception
                       handleFailure(caught);
               }
               catch(Throwable e) {
                      //default application-wide error handling
               }
       }

       //provide a default implementation. Code that wants to handle
 exceptions can do so by overriding this method
       //Lazy developers can just ignore it, and the app-wide error handling
 framework will do the needful
       public void handleFailure(Throwable t) throws Exception {
              throw t;
       }

 }

 --Sri

 On 27 April 2010 12:38, StrongSteve swe.sta...@gmail.com wrote:



  Thanks for your quick reply.

  I am just wondering if there is no easier way to do this.

  I mean, adding an exception to all server methods and checking it in
  every onFailure block does not seem so pratical to me.

  There should be an easier way!

  Thanks in Advance!
  Stefan

  On Apr 26, 5:08 pm, kozura koz...@gmail.com wrote:
   Easiest is probably to just create an exception for session timeout,
   and throw it on the server side after you check for session validity.
   Then put a standard method in your onFailure call to popup the error
   when that exception is received.

   On Apr 26, 8:25 am,StrongSteveswe.sta...@gmail.com wrote:

Hi Everbody,

I am looking for a way to implement a session timeout behaviour into
my GWT application.

On the ServerSide I have a session listener that sets the value for
the session timeout as soon as a new session is being created.

Now what I would like to do is to present the user a popup as soon as
the session has experied.
This does not have to happen automatically. It is also ok to show this
popup as soon as a new request is addressed against the server.

Now I am looking for some best practices on how to deal with this
problem.
I believe some of you have already dealt with similar problem! ;)

Thanks in Advance for your help!

Greetings
Stefan

   --
   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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
   For more options, visit this group athttp://
  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 
 athttp://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: Session Timeout Popup

2010-04-27 Thread charlie
Gah, wish I would have done this at the start instead of at the end.  Good
call though.

On Tue, Apr 27, 2010 at 4:29 AM, Sripathi Krishnan 
sripathikrish...@gmail.com wrote:

 Just have a custom class the extends AsyncCallback, like below, and mandate
 that everybody uses it instead of directly using AsyncCallback.

 public abstract class MyAsyncCallbackT implements AsyncCallbackT {

   public void onFailure(Throwable caught) {
   if(caught instanceof AuthenticationException) {
 //redirect to login page
   }
   else if(caught instanceof AuthorizationException) {
 //tell the user he doesn't have rights to perform this
 operation
   }

   try {
   //allow your application to handle the exception
   handleFailure(caught);
   }
   catch(Throwable e) {
  //default application-wide error handling
   }
   }

   //provide a default implementation. Code that wants to handle
 exceptions can do so by overriding this method
   //Lazy developers can just ignore it, and the app-wide error handling
 framework will do the needful
   public void handleFailure(Throwable t) throws Exception {
  throw t;
   }
 }


 --Sri




 On 27 April 2010 12:38, StrongSteve swe.sta...@gmail.com wrote:

 Thanks for your quick reply.

 I am just wondering if there is no easier way to do this.

 I mean, adding an exception to all server methods and checking it in
 every onFailure block does not seem so pratical to me.

 There should be an easier way!

 Thanks in Advance!
 Stefan

 On Apr 26, 5:08 pm, kozura koz...@gmail.com wrote:
  Easiest is probably to just create an exception for session timeout,
  and throw it on the server side after you check for session validity.
  Then put a standard method in your onFailure call to popup the error
  when that exception is received.
 
  On Apr 26, 8:25 am,StrongSteveswe.sta...@gmail.com wrote:
 
 
 
   Hi Everbody,
 
   I am looking for a way to implement a session timeout behaviour into
   my GWT application.
 
   On the ServerSide I have a session listener that sets the value for
   the session timeout as soon as a new session is being created.
 
   Now what I would like to do is to present the user a popup as soon as
   the session has experied.
   This does not have to happen automatically. It is also ok to show this
   popup as soon as a new request is addressed against the server.
 
   Now I am looking for some best practices on how to deal with this
   problem.
   I believe some of you have already dealt with similar problem! ;)
 
   Thanks in Advance for your help!
 
   Greetings
   Stefan
 
  --
  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 athttp://
 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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
charlie/

-- 
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: Session Timeout Popup

2010-04-27 Thread gcstang
Nice idea but what about when the data is all client side that they
are dealing with...until they try to hit the server it still won't
show a popup.

Any other ideas?

The only other thing I can think of combined with yours is have a call
made every min or less in a timer that makes a call using your method?

Of course this would have to be in something that doesn't leave the
screen like in a header or footer I would guess.


On Apr 27, 4:29 am, Sripathi Krishnan sripathikrish...@gmail.com
wrote:
 Just have a custom class the extends AsyncCallback, like below, and mandate
 that everybody uses it instead of directly using AsyncCallback.

 public abstract class MyAsyncCallbackT implements AsyncCallbackT {

       public void onFailure(Throwable caught) {
               if(caught instanceof AuthenticationException) {
                     //redirect to login page
               }
               else if(caught instanceof AuthorizationException) {
                     //tell the user he doesn't have rights to perform this
 operation
               }

               try {
                       //allow your application to handle the exception
                       handleFailure(caught);
               }
               catch(Throwable e) {
                      //default application-wide error handling
               }
       }

       //provide a default implementation. Code that wants to handle
 exceptions can do so by overriding this method
       //Lazy developers can just ignore it, and the app-wide error handling
 framework will do the needful
       public void handleFailure(Throwable t) throws Exception {
              throw t;
       }

 }

 --Sri

 On 27 April 2010 12:38, StrongSteve swe.sta...@gmail.com wrote:





  Thanks for your quick reply.

  I am just wondering if there is no easier way to do this.

  I mean, adding an exception to all server methods and checking it in
  every onFailure block does not seem so pratical to me.

  There should be an easier way!

  Thanks in Advance!
  Stefan

  On Apr 26, 5:08 pm, kozura koz...@gmail.com wrote:
   Easiest is probably to just create an exception for session timeout,
   and throw it on the server side after you check for session validity.
   Then put a standard method in your onFailure call to popup the error
   when that exception is received.

   On Apr 26, 8:25 am,StrongSteveswe.sta...@gmail.com wrote:

Hi Everbody,

I am looking for a way to implement a session timeout behaviour into
my GWT application.

On the ServerSide I have a session listener that sets the value for
the session timeout as soon as a new session is being created.

Now what I would like to do is to present the user a popup as soon as
the session has experied.
This does not have to happen automatically. It is also ok to show this
popup as soon as a new request is addressed against the server.

Now I am looking for some best practices on how to deal with this
problem.
I believe some of you have already dealt with similar problem! ;)

Thanks in Advance for your help!

Greetings
Stefan

   --
   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.comgoogle-web-toolkit%2Bunsubs 
  cr...@googlegroups.com
  .
   For more options, visit this group athttp://
  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%2Bunsubs 
  cr...@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 
 athttp://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: Session Timeout Popup

2010-04-27 Thread Sripathi Krishnan

 Nice idea but what about when the data is all client side that they
 are dealing with...until they try to hit the server it still won't
 show a popup.


Can't do much about it, and there is no point in thinking about it as well.
I don't know any website that does anything about it. Besides, its only a
matter of minutes before the app is going to make a server call.

The only other thing I can think of combined with yours is have a call
 made every min or less in a timer that makes a call using your method?

Sure, it would work. Its just too much effort for a feature that's not all
that worth (atleast imho). Besides, it has the disadvantage (or advantage?)
of never timing out your session, and also being a n/w hog.

--Sri



On 27 April 2010 22:59, gcstang gcst...@gmail.com wrote:

 Nice idea but what about when the data is all client side that they
 are dealing with...until they try to hit the server it still won't
 show a popup.

 Any other ideas?

 The only other thing I can think of combined with yours is have a call
 made every min or less in a timer that makes a call using your method?

 Of course this would have to be in something that doesn't leave the
 screen like in a header or footer I would guess.


 On Apr 27, 4:29 am, Sripathi Krishnan sripathikrish...@gmail.com
 wrote:
  Just have a custom class the extends AsyncCallback, like below, and
 mandate
  that everybody uses it instead of directly using AsyncCallback.
 
  public abstract class MyAsyncCallbackT implements AsyncCallbackT {
 
public void onFailure(Throwable caught) {
if(caught instanceof AuthenticationException) {
  //redirect to login page
}
else if(caught instanceof AuthorizationException) {
  //tell the user he doesn't have rights to perform
 this
  operation
}
 
try {
//allow your application to handle the exception
handleFailure(caught);
}
catch(Throwable e) {
   //default application-wide error handling
}
}
 
//provide a default implementation. Code that wants to handle
  exceptions can do so by overriding this method
//Lazy developers can just ignore it, and the app-wide error
 handling
  framework will do the needful
public void handleFailure(Throwable t) throws Exception {
   throw t;
}
 
  }
 
  --Sri
 
  On 27 April 2010 12:38, StrongSteve swe.sta...@gmail.com wrote:
 
 
 
 
 
   Thanks for your quick reply.
 
   I am just wondering if there is no easier way to do this.
 
   I mean, adding an exception to all server methods and checking it in
   every onFailure block does not seem so pratical to me.
 
   There should be an easier way!
 
   Thanks in Advance!
   Stefan
 
   On Apr 26, 5:08 pm, kozura koz...@gmail.com wrote:
Easiest is probably to just create an exception for session timeout,
and throw it on the server side after you check for session validity.
Then put a standard method in your onFailure call to popup the error
when that exception is received.
 
On Apr 26, 8:25 am,StrongSteveswe.sta...@gmail.com wrote:
 
 Hi Everbody,
 
 I am looking for a way to implement a session timeout behaviour
 into
 my GWT application.
 
 On the ServerSide I have a session listener that sets the value for
 the session timeout as soon as a new session is being created.
 
 Now what I would like to do is to present the user a popup as soon
 as
 the session has experied.
 This does not have to happen automatically. It is also ok to show
 this
 popup as soon as a new request is addressed against the server.
 
 Now I am looking for some best practices on how to deal with this
 problem.
 I believe some of you have already dealt with similar problem! ;)
 
 Thanks in Advance for your help!
 
 Greetings
 Stefan
 
--
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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs
 cr...@googlegroups.com
   .
For more options, visit this group athttp://
   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.comgoogle-web-toolkit%2Bunsubs
 cr...@googlegroups.com
   .
   For more options, visit this group at
  

Session Timeout Popup

2010-04-26 Thread StrongSteve
Hi Everbody,

I am looking for a way to implement a session timeout behaviour into
my GWT application.

On the ServerSide I have a session listener that sets the value for
the session timeout as soon as a new session is being created.

Now what I would like to do is to present the user a popup as soon as
the session has experied.
This does not have to happen automatically. It is also ok to show this
popup as soon as a new request is addressed against the server.

Now I am looking for some best practices on how to deal with this
problem.
I believe some of you have already dealt with similar problem! ;)

Thanks in Advance for your help!

Greetings
Stefan

-- 
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: Session Timeout Popup

2010-04-26 Thread kozura
Easiest is probably to just create an exception for session timeout,
and throw it on the server side after you check for session validity.
Then put a standard method in your onFailure call to popup the error
when that exception is received.

On Apr 26, 8:25 am, StrongSteve swe.sta...@gmail.com wrote:
 Hi Everbody,

 I am looking for a way to implement a session timeout behaviour into
 my GWT application.

 On the ServerSide I have a session listener that sets the value for
 the session timeout as soon as a new session is being created.

 Now what I would like to do is to present the user a popup as soon as
 the session has experied.
 This does not have to happen automatically. It is also ok to show this
 popup as soon as a new request is addressed against the server.

 Now I am looking for some best practices on how to deal with this
 problem.
 I believe some of you have already dealt with similar problem! ;)

 Thanks in Advance for your help!

 Greetings
 Stefan

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