1. #121
    Ext User
    Join Date
    Feb 2008
    Posts
    31
    Vote Rating
    0
    thijsvanmenen is on a distinguished road

      0  

    Default


    Currently I use Ext.state.SessionProvider (from the Ext examples) but I want to switch to this implementation.

    But is there a way to combine a CookieProvider with this one? I only know the logged in user from the cookie.

    So I want to store the logged in user in the cookie, and the rest of the state in the database.

    TIA.

  2. #122
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Not really. There can be only one provider set in state manager. You need to access cookies some another way.

    BTW, why do you want to switch from SessionProvider?

  3. #123
    Ext User
    Join Date
    Feb 2008
    Posts
    31
    Vote Rating
    0
    thijsvanmenen is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    BTW, why do you want to switch from SessionProvider?
    Because I am running into problems with cookie length.

  4. #124
    Sencha User
    Join Date
    Aug 2008
    Posts
    65
    Vote Rating
    0
    smudgeface is on a distinguished road

      0  

    Default


    why not just manually set a cookie

  5. #125
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Yes, that is what I've meant.

  6. #126
    Ext User
    Join Date
    Mar 2007
    Posts
    44
    Vote Rating
    0
    cebola is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    @DamianHartin,

    take a look at some of my examples or main page http://extjs.eu. There you can see working stateful ThemeCombo.
    This example just save state.
    But not restore state from server.
    How to do this?

    If i Use the Ext.state.CookieProvider in my app, the grid render with the last colum possition.
    Its possible using Ext.ux.HttpProvider ???

  7. #127
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    No, CookieProvider is different provider. This page uses HttpProvider; just study how it is done there: http://cellactions.extjs.eu/

  8. #128
    Ext User
    Join Date
    Mar 2007
    Posts
    44
    Vote Rating
    0
    cebola is on a distinguished road

      0  

    Default


    Quote Originally Posted by jsakalos View Post
    No, CookieProvider is different provider. This page uses HttpProvider; just study how it is done there: http://cellactions.extjs.eu/
    Tank you Saki.
    But.. I create other class extend from CookieProvider with base in httpProvider

    PHP Code:
    Ext.ux.HttpDBProvider = function(config) {
        
    Ext.ux.HttpDBProvider.superclass.constructor.call(this,config);
        
    this.path "/";
        
    this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days
        
    this.domain null;
        
    this.secure false
        this
    .state={};
        
    Ext.apply(thisconfig);
    }

    Ext.extend(Ext.ux.HttpDBProviderExt.state.CookieProvider, {
        
    setCookie : function(namevalue){
            var 
    = {
                 
    url:this.saveUrl || this.url
                
    ,method:this.method
                
    ,scope:this
                
    ,params:{}
            };
            var 
    params Ext.apply({}, this.saveBaseParams);
            
    params[this.paramNames.id] = this.id;
            
    params[this.paramNames.session] = this.session;
            
    params[this.paramNames.user] = this.user;
            
    params[this.paramNames.name] = name;
            
    params[this.paramNames.data] = this.encodeValue(value);
            
    Ext.apply(o.paramsparams);
            
    Ext.Ajax.request(o);
        },
        
    readCookies : function(){
            var 
    cookies = {};
            var 
    = {url:this.readUrl||this.url,method:this.method ,scope:this,params:{}
                ,
    success:function(responseoptions){
                    var 
    data = eval(response.responseText.split("\n")[0]);
                    
    Ext.each(data, function(item) {
                        var 
    tmp;
                        try {
                            
    tmp=this.decodeValue(item[this.paramNames.value]);
                        } catch(
    e){ dump(e);realAlert(e);return }
                        
    this.state[item[this.paramNames.name]] = tmp;
                    }, 
    this);
                }
            };
            var 
    params Ext.apply({}, this.readBaseParams);
            
    params[this.paramNames.id] = this.id;
            
    params[this.paramNames.session] = this.session;
            
    params[this.paramNames.user] = this.user;
            
    Ext.apply(o.paramsparams);
            
    Ext.Ajax.request(o);
            return
        },
        
    clearCookie : function(name){
            var 
    = {url:this.saveUrl||this.url,method:this.method,scope:this,params:{}};
            var 
    params Ext.apply({}, this.cleanBaseParams);
            
    params[this.paramNames.id] = this.id;
            
    params[this.paramNames.session] = this.session;
            
    params[this.paramNames.user] = this.user;
            
    params[this.paramNames.name] = name;
            
    Ext.apply(o.paramsparams);
            
    Ext.Ajax.request(o);
        }
    }); 
    PHP Code:
    this.cp=new Ext.ux.HttpDBProvider({id:"STATEPROVIDER",paramNames:{id:'CODIGO',name:'nome',value:'valor',user:'usuario',session:'SESSAO',data:'dados'},session:"",method:'POST',cleanBaseParams:{cmd:'cleanState'},readBaseParams:{cmd:'readState'},saveBaseParams:{cmd:'saveState'},readUrl:"",saveUrl:"",user:99,url:'jsonsql.php'});
    Ext.state.Manager.setProvider(this.cp); 
    on ready page I create the state object with readCookies;
    PHP Code:
    this.cp.readCookies(); 
    It's solve my problems.

  9. #129
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,132
    Vote Rating
    322
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Sorry, in that case you are on your own.

  10. #130
    Ext User
    Join Date
    Mar 2007
    Posts
    44
    Vote Rating
    0
    cebola is on a distinguished road

      0  

    Default


    ok Saki.. No problems..
    only for shared....

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar