Package com.vaadin.flow.component.page
Interface History.HistoryJs
- All Superinterfaces:
Serializable
- Enclosing class:
History
What this history asks of the browser, as a JavaScript definition for
Page.executeJs(Class).- Since:
- 25.4
-
Method Summary
Modifier and TypeMethodDescriptionvoidback()Goes back one entry, as the back button of the browser does.voidforward()Goes forward one entry, as the forward button of the browser does.voidgo(int steps) Goes the given number of entries forward, or backward for a negative number.voidnavigatePushing(tools.jackson.databind.node.BaseJsonNode state, String url, boolean callback) Hands the address to the client side router, which pushes the history entry itself once it has navigated.voidnavigateReplacing(tools.jackson.databind.node.BaseJsonNode state, String url, boolean callback) Hands the address to the client side router, which replaces the current history entry once it has navigated.voidPushes a history entry, for an application whose client side router does not write one itself.voidreplaceState(tools.jackson.databind.node.BaseJsonNode state, String url) Replaces the current history entry, for an application whose client side router does not write one itself.
-
Method Details
-
pushState
@JsExpression("setTimeout(() => { window.history.pushState($0, \'\', $1); window.dispatchEvent(new CustomEvent(\'vaadin-navigated\')); })") void pushState(tools.jackson.databind.node.BaseJsonNode state, String url) Pushes a history entry, for an application whose client side router does not write one itself.- Parameters:
state- the state of the entry, ornullfor noneurl- the address of the entry
-
replaceState
@JsExpression("setTimeout(() => { window.history.replaceState($0, \'\', $1); window.dispatchEvent(new CustomEvent(\'vaadin-navigated\')); })") void replaceState(tools.jackson.databind.node.BaseJsonNode state, String url) Replaces the current history entry, for an application whose client side router does not write one itself.- Parameters:
state- the state of the entry, ornullfor noneurl- the address of the entry
-
back
Goes back one entry, as the back button of the browser does. -
forward
Goes forward one entry, as the forward button of the browser does. -
go
Goes the given number of entries forward, or backward for a negative number.- Parameters:
steps- how many entries to go, where zero reloads the page