The user might have two different expectations when pressing the back button: either leaving the application or going back one step. However, in an AJAX application it is not self-evident what going back one step means. In the context of xUML UIs we define each state change as a step. A state change is every state transition in the UI controller state machine. These state changes are saved to the browser history by changing the URL, for example the forms UI example has the following URL after loading the page: http://localhost:12461/ui/UIForm.html#0

After pressing the UI create button, the URL changes to: http://localhost:12461/ui/UIForm.html#1

The browser and the controller state machine remember each state by using the above URLs that enumerate all states using an URL anchor. If the user presses the back button, the browser will go back to the last URL and the UI controller will use this URL to go back to the last state.

However, changing the Browser URL is not always sensible. For example, if the user expects to leave the application when pressing the back button, the above mechanism should be switched off. Furthermore, it is not advisable to change the URL, if the UI controller is embedded in another framework such as Microsoft SharePoint™ or any other kind of Web Portal. Thus, it is possible to switch off the Browser history support by setting supportBrowserHistory=false on the UI controller:

  • No labels