public class HistoryImplPushState extends Object implements com.google.gwt.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 |
---|---|
com.google.gwt.event.shared.HandlerRegistration |
addValueChangeHandler(com.google.gwt.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(com.google.gwt.event.shared.GwtEvent<?> 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(com.google.gwt.event.shared.GwtEvent<?> event)
fireEvent
in interface com.google.gwt.event.shared.HasHandlers
public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler<String> handler)
ValueChangeEvent
handler to be informed of changes to the
browser's history stack.addValueChangeHandler
in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<String>
handler
- the handlerpublic final void newItem(String historyToken, boolean issueEvent)
ValueChangeHandler.onValueChange(com.google.gwt.event.logical.shared.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(com.google.gwt.event.logical.shared.ValueChangeEvent)
event should be issuedCopyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.