public class

HistoryImpl

extends Object
implements HasValueChangeHandlers<T> HasHandlers
java.lang.Object
   ↳ com.google.gwt.user.client.impl.HistoryImpl

Class Overview

Native implementation associated with History. User classes should not use this class directly.

This base version uses the HTML5 standard window.onhashchange event to determine when the URL hash identifier changes.

Summary

Public Constructors
HistoryImpl()
Public Methods
HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler)
Adds a ValueChangeEvent handler to be informed of changes to the browser's history stack.
void fireEvent(GwtEvent<?> event)
Fires the given event to the handlers listening to the event's type.
void fireHistoryChangedImpl(String newToken)
Fires the ValueChangeEvent to all handlers with the given tokens.
HandlerManager getHandlers()
static String getToken()
boolean init()
final void newItem(String historyToken, boolean issueEvent)
final void newItemOnEvent(String historyToken)
static void setUpdateHashOnIE6(boolean updateHash)
This method is deprecated. This is no longer necessary, as the underlying performance problem has been solved. It is now a no-op.
Protected Methods
String decodeFragment(String encodedFragment)
String encodeFragment(String fragment)
void nativeUpdate(String historyToken)
The standard updateHash implementation assigns to location.hash() with an encoded history token.
void nativeUpdateOnEvent(String historyToken)
static void setToken(String token)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gwt.event.logical.shared.HasValueChangeHandlers
From interface com.google.gwt.event.shared.HasHandlers

Public Constructors

public HistoryImpl ()

Public Methods

public HandlerRegistration addValueChangeHandler (ValueChangeHandler<String> handler)

Adds a ValueChangeEvent handler to be informed of changes to the browser's history stack.

Parameters
handler the handler

public void fireEvent (GwtEvent<?> event)

Fires the given event to the handlers listening to the event's type.

Any exceptions thrown by handlers will be bundled into a UmbrellaException and then re-thrown after all handlers have completed. An exception thrown by a handler will not prevent other handlers from executing.

Parameters
event the event

public void fireHistoryChangedImpl (String newToken)

Fires the ValueChangeEvent to all handlers with the given tokens.

public HandlerManager getHandlers ()

public static String getToken ()

public boolean init ()

public final void newItem (String historyToken, boolean issueEvent)

public final void newItemOnEvent (String historyToken)

public static void setUpdateHashOnIE6 (boolean updateHash)

This method is deprecated.
This is no longer necessary, as the underlying performance problem has been solved. It is now a no-op.

Sets whether the IE6 history implementation will update the URL hash when creating a new item. This should be used only for applications with large DOM structures that are suffering from performance problems when creating a new history item on IE6 and 7.

Protected Methods

protected String decodeFragment (String encodedFragment)

protected String encodeFragment (String fragment)

protected void nativeUpdate (String historyToken)

The standard updateHash implementation assigns to location.hash() with an encoded history token.

protected void nativeUpdateOnEvent (String historyToken)

protected static void setToken (String token)