Package library :: Package pyjamas :: Module History
[hide private]
[frames] | no frames]

Module History

source code

Functions [hide private]
 
addHistoryListener(listener) source code
 
back() source code
 
forward() source code
 
getToken() source code
 
newItem(ht) source code
 
onHistoryChanged(ht) source code
 
fireHistoryChangedAndCatch() source code
 
fireHistoryChangedImpl(ht) source code
 
removeHistoryListener(listener) source code
 
_first_notify() source code
 
init() source code
Variables [hide private]
  historyToken = ''
  historyListeners = []
Simple History management class for back/forward button support.
Variables Details [hide private]

historyListeners

Simple History management class for back/forward button support.

This class allows your AJAX application to use a history. Each time you call newItem(), a new item is added to the history and the history listeners are notified. If the user clicks the browser's forward or back buttons, the appropriate item (a string passed to newItem) is fetched from the history and the history listeners are notified.

The address bar of the browser contains the current token, using the "#" seperator (for implementation reasons, not because we love the # mark).

You may want to check whether the hash already contains a history token when the page loads and use that to show appropriate content; this allows users of the site to store direct links in their bookmarks or send them in emails.

To make this work properly in all browsers, you must add a specially named iframe to your html page, like this:

<iframe id='__pygwt_historyFrame' style='width:0;height:0;border:0' />

Value:
[]