Hello,

Thanks, I've done this using the cookie suggestion.

On Sat, Dec 17, 2016 at 12:27 AM, Vassilis Virvilis <[email protected]>
wrote:

> You can pass a url fragment argument like
> Window.Location.replace(GWT.getHostPageBaseURL() + "#error=Something bad
> happened");
> and then in your login page you have to check for url fragments (after #).
>
> Similarly if you don't want to pollute your urls you can
>
>    - set a cookie
>    - use sessionStorage
>    - use localStorage
>
> to communicate the error state to the new page.
>
> Hope that helps
>
>     Vassilis
>
>
>
>
>
> On Sat, Dec 17, 2016 at 12:22 AM, Olar Andrei <[email protected]>
> wrote:
>
>> Hello,
>>
>> I have this small example. I am on the user page. In the constructor the
>> UserInfo object is set. If something happens I want to redirect back to the
>> login page, which I do like in the example below. Is there a possibility to
>> display a message back on the login page like "An error eccurred bla bla
>> bla. Please log in again." ?
>>
>> Thanks in advance.
>>
>> public UserPanel() {
>> setUserInfo();
>>
>> if (userInfo == null) {
>> Window.Location.replace(GWT.getHostPageBaseURL());
>> }
>>
>> container = new MaterialContainer();
>> container.setFontSize("1em");
>>
>> Widget mainMenu = createMenu();
>> initWidget(mainMenu);
>> }
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Vassilis Virvilis
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/google-web-toolkit/3Bdp0kiOi1s/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to