Saturday, May 31, 2014

Re: How to fire an event when Cookies has just expired in GWT?

I found a solution
Timer showLoginPanelTimer = new Timer() {            public void run() {                  getView().getLoginPanel().setVisible(true);                getView().getSuccessfulLoginPanel().setVisible(false);                getView().getEmailBox().setText("");                getView().getPasswordBox().setText("");                Utility.removeUserInfoCookies();            }       };          showLoginPanelTimer.schedule(Utility.COOKIE_TIMEOUT);

On Saturday, May 31, 2014 3:20:14 PM UTC+10, Tom wrote:

Ok, here is the requirement.

I want to build a system look like this:

- Header: have a PleaseLoginPanel and SuccessfulLoginPanel  - Content Page just contains content & communicate with header via EventBuss  - HeaderPresenter is the parent presenter & ContentPresenter is nested inside the Header presenter.  

Let say when user opens this url "mydomain#content" they will see a page that has header contaning PleaseLoginPanel on top & a content part (beneath the header) contaning some textarea and button for user to input data and submit to DB .

To be able to access the widget in content page the user need to login, after logged in, the PleaseLoginPanel will be invisible and the SuccessfulLoginPanel will be visible. User now can play with widgets in content part.

Let say Session & Cookies will last 1 hour, after the session cookies expired the user can not submit the content data.

Let say user spent a lot of efforts to prepare data & about to submit but the session expired so he can't submit. At that time, in the header the SuccessfulLoginPanel still stay there. So the user can lose all his content he prepared before. You may say, he can open a new page & login & copy the data from the old page (the page that has session expired & does not have PleaseLoginPanel), but that still cost him a lot of effort to copy over.

So I want that, when the Cookes has just expired it will fire an Event to the Header & ask the header to show the PleaseLoginPanel

How can we do that in GWT or GWTP?

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment