public class HistoryImplPushState extends Object implements org.gwtproject.event.logical.shared.HasValueChangeHandlers<String>
This class no longer inherits from HistoryImpl to allow for compatibility with both GWT 2.6 and GWT 2.7+. HistoryImpl was moved in GWT 2.7 and is no longer accessible. The previously inherited methods are now part of this class.
The complete path is treated as history token.
The leading '/' is hidden from GWTs History API, so that the path '/' is returned as an empty history token ('').
| Constructor and Description |
|---|
HistoryImplPushState() |
| Modifier and Type | Method and Description |
|---|---|
org.gwtproject.event.shared.HandlerRegistration |
addValueChangeHandler(org.gwtproject.event.logical.shared.ValueChangeHandler<String> handler)
Adds a
ValueChangeEvent handler to be informed of changes to the browser's history
stack. |
void |
fireCurrentHistoryState()
Fires the
ValueChangeEvent to all handlers with the current token. |
void |
fireEvent(org.gwtproject.event.shared.Event<?> event) |
void |
fireHistoryChangedImpl(String newToken)
Fires the
ValueChangeEvent to all handlers with the given tokens. |
boolean |
init() |
void |
newItem(String historyToken,
boolean issueEvent)
Adds a new browser history entry.
|
public boolean init()
public void fireHistoryChangedImpl(String newToken)
ValueChangeEvent to all handlers with the given tokens.public void fireCurrentHistoryState()
ValueChangeEvent to all handlers with the current token.public void fireEvent(org.gwtproject.event.shared.Event<?> event)
fireEvent in interface org.gwtproject.event.shared.HasHandlerspublic org.gwtproject.event.shared.HandlerRegistration addValueChangeHandler(org.gwtproject.event.logical.shared.ValueChangeHandler<String> handler)
ValueChangeEvent handler to be informed of changes to the browser's history
stack.addValueChangeHandler in interface org.gwtproject.event.logical.shared.HasValueChangeHandlers<String>handler - the handlerpublic final void newItem(String historyToken, boolean issueEvent)
ValueChangeHandler.onValueChange(ValueChangeEvent) to be called as well if and only if
issueEvent is true.historyToken - the token to associate with the new history itemissueEvent - true if a ValueChangeHandler.onValueChange(ValueChangeEvent) event
should be issuedCopyright © 2020 Treblereel. All rights reserved.