Friday, March 30, 2012

Re: how to go to non-gwt page from gwt app

Window.Location.assign("your page here");

See http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/Window.Location.html

On Fri, Mar 30, 2012 at 10:06 AM, mars <marsgirl@gmail.com> wrote:
> i have gwt app that if the user fail the authentication, it kick the
> user out to login page, which is a non-gwt page, what the function
> that i can use to do the redirection on the client side?
>
> here is my code:
>
>    userService.getCurrentUser(new AsyncCallback<User>() {
>        public void onFailure(Throwable exception) {
>            Window.alert(exception.getMessage());
>            GWT.log("getCurrentUser failed", exception);
>
>            //go to home.html, how?
>        }
>
>        public void onSuccess(User result) {
>            m_eventBus.fireEvent(new LoginEvent(result));
>        }
>    });
>
> Thanks!
>
> --
> 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+unsubscribe@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.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment