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