Refresh reloads your javascript and runs it from the top so if the first
thing your app does is display the login in screen then that is what will be
displayed when the user refreshes the page.

Use history and HistoryListener to control your user's navigation. A common
patter is the following:

        String initToken = History.getToken();
        if (initToken.length() == 0) {
            History.newItem("login");
        }
        History.addValueChangeHandler(new MyHistoryListener());
        History.fireCurrentHistoryState();

Initially your OnModuleLoad method in your entry point should set history to
"login" or some other token that will direct your user to the login "page".

In your HistoryListener you should react to a "login" token by displaying
the login screen. Once logged in set cookies appropriately.

In your entry point's OnModuleLoad method you can check for cookies and if
present add a new token such as "next" and handle next in your History
listener to do what ever the user should see if they are already logged in.

If your user is logged in (cookies exist) and they press refresh they will
be directed to the correct view because "next" is the current history token.

Jeff


On Mon, Oct 25, 2010 at 8:17 AM, sam <syambabu...@gmail.com> wrote:

> i created a Gwt prototype,entry point is LOGIN page,once login is
> success it will direct to the home page.The
> problem is after login successfully if i click on the "refresh button
> of the Browser its directing to the login page".so that i have to
> enter the login details again.
>
> please suggest me to avoid this problem.
>
> --
> 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<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
Jeff

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

Reply via email to