This content has been marked as final.
Show 1 reply
-
1. Re: How to get Page state (Multimap<String,String>) passed from previous page?
csa Jan 24, 2014 12:10 PM (in response to rathiandi)Hi Amit,
You can get access to the page state using fields annotated with @PageState in your Page2 or via an optional parameter of type HistoryToken in methods annotated with @PageShowing or @PageShown.
@Page public class Page2 extends VerticalPanel { @PageState private String error; //By default, the field name should be aligned with the key you used when storing the state in the map. //You can change that using @PageState("myKey") ... }
or
@Page public class Page2 extends VerticalPanel { @PageShowing private void beforeShow(HistoryToken rawStateToken) { String message = rawStateToken.getState().get(ERROR); .... } }
See the docs for details: http://docs.jboss.org/errai/2.4.3.Final/errai/reference/html_single/#sid-54493676_ErraiUINavigation-DeclaringaPage (Page State Parameters)
Cheers,
Christian