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 contaningPleaseLoginPanel
on top & a content part (beneath the header) contaning sometextarea
andbutton
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 theSuccessfulLoginPanel
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 havePleaseLoginPanel
), 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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment