public interface UrlRouting
@Inject private UrlRouting urlRouting; private void changeUrl() { Map<String, String> params = ParamsMap.of( "param1", "value1", "param2", "value2"); urlRouting.pushState(this, params); }
Modifier and Type | Interface and Description |
---|---|
static interface |
UrlRouting.RouteGenerator
Provides API to generate routes for screens with optional URL parameters.
|
Modifier and Type | Method and Description |
---|---|
UrlRouting.RouteGenerator |
getRouteGenerator() |
NavigationState |
getState() |
default void |
pushState(Screen screen)
Pushes the state corresponding to the given
screen . |
void |
pushState(Screen screen,
java.util.Map<java.lang.String,java.lang.String> urlParams)
Pushes the state corresponding to the given
screen . |
default void |
replaceState(Screen screen)
Replaces current state by the state corresponding to the given
screen . |
void |
replaceState(Screen screen,
java.util.Map<java.lang.String,java.lang.String> urlParams)
Replaces current state by the state corresponding to the given
screen . |
default void pushState(Screen screen)
screen
.
Creates new entry in browser history.
screen
- screen that is used to build new navigation statevoid pushState(Screen screen, java.util.Map<java.lang.String,java.lang.String> urlParams)
screen
.
The given urlParams
will be reflected in URI as GET request params.
Creates new entry in browser history.
screen
- screen that is used to build new navigation stateurlParams
- URI params mapdefault void replaceState(Screen screen)
screen
.
Doesn't create new entry in browser history.
screen
- screen that is used to build new navigation statevoid replaceState(Screen screen, java.util.Map<java.lang.String,java.lang.String> urlParams)
screen
.
The given urlParams
will be reflected in URI as GET request params.
Doesn't create new entry in browser history.
screen
- screen that is used to build new navigation stateurlParams
- URI params mapNavigationState getState()
UrlRouting.RouteGenerator getRouteGenerator()
UrlRouting.RouteGenerator
instance