View Full Version : Cant make the state provider to work
14 Oct 2012, 1:40 AM
Can any one supply a working sample for using a cookieprovider and saveing it an array?
I cant seem to find any working sample in the forum or anywhere.
15 Oct 2012, 1:43 PM
The array grid example uses the provider to save the state of the columns and such.
15 Oct 2012, 7:28 PM
I asked for a sample that I can use the state events like savestate and getState to state my own array with nothing to do with a grid and its properties.
There is no working sample in this forum or in the Internet.
Can you supply one.
This is a question being repeatedly being asked and with no responce.
16 Oct 2012, 4:23 AM
The grid (which any component can) saves it's state so you can look at some source on how the state is being saved.
16 Oct 2012, 4:27 AM
Can you please supply a working sample
16 Oct 2012, 9:07 AM
As simple as it gets:
// save data
var original = [1, 2, 3, 'a', 'b', 'c'];
// load data
var duplicate = Ext.state.Manager.get('data');
For anything more complex, check out the Stateful (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.state.Stateful) mixin and the source for other stateful components like grids (as Mitchell has suggested).
16 Oct 2012, 9:19 PM
I will try it
17 Oct 2012, 3:24 AM
I didnt use Ext.JSON.encode to encode my mixed collection.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.