Results 1 to 3 of 3

Thread: cookieprovder

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    192
    Answers
    5

    Default cookieprovder

    Hi all,
    I have an Ext.window tha holds as a varibable a mixed collection whcih I want to save using the state provider.

    Could find a sample for making it work.

    On the initComponent I wrote:
    Code:
     var stateProvider = Ext.create('Ext.state.CookieProvider', {
                 path: "/xxx/",
                 expires: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 60)), //60 days             domain: "xxx.com"
                }); 
               this.stateProvider = stateProvider;   
             Ext.state.Manager.setProvider(stateProvider);
    And I have used set for the collection like this:
    this.stateProvider.set(this.stateKey, this.stickyChartsCollection);

    And I tried the get method on the initcomponent and nothing works
    Any ideas?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    Is the cookie populated and have you verified the object is valid?

    Scott.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    192
    Answers
    5

    Default No - the cookie is not created

    And this is a simple mixed collection.
    Can you supply a working code demo that I can save some array into a cookie and get it back?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •