views:

106

answers:

0

So the other day I posted about a problem I had trying to use the sessionProvider found in the examples of ExtJS but it was in a fairly complex page so I figured I woud trim things down and use the basic array-grid sample that uses the default CookieProvider to demonstrate the state saving in a cookie and modify it to use the SessionProvider. So, based on the README file found in the examples/state folder, I added the 3 script tags needed in the HTML file and changed the setProvider call to use the SessionProvider and I have the same javascript error when restoring the state.

You can view the problem here http://development.emaint.com/box/ext-3.2.1/examples/grid/array-grid.html

If you just change the sort and hit F5 to refresh the page you will get a refresh error and you can use Firebug's net tab to check the HTTP requests of save-state.php to view the cookies that were sent and then use the get-state.php function to view the state returned. there is some encoding issue that I can't figure out.

Further info if you don't wish to do it all manually: Cookie value sent to the save-state.php request...

PHPSESSID=67a81r64rmrqh4j08u7e7i9n20; X-Mapping-nbhajkek=36EC75A1981637B69A514E9DE1840EA1; ys-grid=o%3Acolumns%3Da%253Ao%25253Aid%25253Ds%2525253Acompany%25255Ewidth%25253Dn%2525253A265%255Eo%25253Aid%25253Dn%2525253A1%25255Ewidth%25253Dn%2525253A75%255Eo%25253Aid%25253Dn%2525253A2%25255Ewidth%25253Dn%2525253A75%255Eo%25253Aid%25253Dn%2525253A3%25255Ewidth%25253Dn%2525253A75%255Eo%25253Aid%25253Dn%2525253A4%25255Ewidth%25253Dn%2525253A85%5Esort%3Do%253Afield%253Ds%25253Aprice%255Edirection%253Ds%25253AASC

Response from the get-state.php request...Ext.appState = {"sessionId":"67a81r64rmrqh4j08u7e7i9n20","grid":"o:columns=a%3Ao%253Aid%253Ds%25253Acompany%255Ewidth%253Dn%25253A265%5Eo%253Aid%253Dn%25253A1%255Ewidth%253Dn%25253A75%5Eo%253Aid%253Dn%25253A2%255Ewidth%253Dn%25253A75%5Eo%253Aid%253Dn%25253A3%255Ewidth%253Dn%25253A75%5Eo%253Aid%253Dn%25253A4%255Ewidth%253Dn%25253A85^sort=o%3Afield%3Ds%253Aprice%5Edirection%3Ds%253AASC"}; The PHP code of these two files is the same as found in ExtJS 3.2.1.

Anyone knows what's happenning ?

Thx