1. #1
    Sencha User
    Join Date
    Jul 2008
    Posts
    35
    Vote Rating
    0
    bradlymathews is on a distinguished road

      0  

    Default State not saving in text box

    State not saving in text box


    Hello,

    State is not working for me on form text boxes.

    I am setting up the state manager using:
    Code:
    Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));
    I am then creating a textbox like:
    Code:
    {
        fieldLabel: '<span style="color:red;">*</span> First Name',
        allowBlank: false,
        id: 'nameOnCardFirst',
        stateful: true,      // Is this even needed in 4.0.7? Demo does not use it.
        stateId: 'statenameOnCardFirst',
        stateEvents: ['change'],        // Again, needed? Demo does not use it.
        name: 'nameOnCardFirst'
    }
    I enter a value in the field, move off the field to trigger the change event, refresh the page and the field is blank.

    What am I missing?

    Thanks,
    Brad

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,167
    Vote Rating
    29
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    I don't think textbox is a stateful widget.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.