06d7e526b8b98e04e68c8ffd9574440d36402a8e.svn-base 861 B

12345678910111213141516
  1. This session scope state provider is in use in window/layout.html.
  2. Usage:
  3. get-state.php is included as JS file in the header of any page that needs state information. For a single
  4. page application, that would be the main page of the application. It is NOT loaded via XHR/Ajax.
  5. save-state.php is included in every page of the application, including pages loaded via ajax.
  6. Inilialization of the SessionProvider looks like:
  7. Ext.state.Manager.setProvider(new Ext.state.SessionProvider({state: Ext.appState}));
  8. The way the session provider works is when a state change occurs, a cookie is set on the client
  9. with the new state data. The next time any page is requested on the server, save-state.php
  10. will see that cookie, save it in the application state and CLEAR THE COOKIE. This way your application
  11. doesn't have cookies creating unneccessary network latency.