Roughian Examples Site Map - Examples - Tutorials

HistoryListener


Version 1.0 onwards

Lets You Interact With Browser History



Sources


This is a application-wide thing that you can access statically from anywhere. You register a history listener and it gets an onChange() event notification.

Within the application, Hyperlinks() add a history item to the stack and, since the current item changes, the onChange() event fires.

When the onChange() event fires, you retrieve the historyToken and use this to set your application up the way you want it. Anything from getting the token 'Home' and showing the Home Page, to more complicated things. This page has the token "Listeners~HistoryListener" and so the app splits it up on "~" and goes to the Listeners tab in the main menu and then to the HistoryListener tab on this menu.