Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cookies 如何在extjs4中使用click函数时重置cookie_Cookies_Extjs_Extjs4 - Fatal编程技术网

Cookies 如何在extjs4中使用click函数时重置cookie

Cookies 如何在extjs4中使用click函数时重置cookie,cookies,extjs,extjs4,Cookies,Extjs,Extjs4,我有一个网格,其中包括一个商店。以便将变量传递到存储。我使用cookies,但每次单击网格中的一个数据。cookie的值等于第一次单击的值,因此它在第一次设置后不会更改 gridside:我尝试在单击数据时设置cookie(使用setcookie)。我试图删除Cookie,然后将rec_dosya声明为全局值,但它们不起作用。我如何解决它,谢谢 var fileGrid_yp_is = new Ext.grid.GridPanel({ contextMenu: new Ex

我有一个网格,其中包括一个商店。以便将变量传递到存储。我使用cookies,但每次单击网格中的一个数据。cookie的值等于第一次单击的值,因此它在第一次设置后不会更改

gridside:我尝试在单击数据时设置cookie(使用setcookie)。我试图删除Cookie,然后将rec_dosya声明为全局值,但它们不起作用。我如何解决它,谢谢

var fileGrid_yp_is = new Ext.grid.GridPanel({
           contextMenu: new Ext.menu.Menu({
           items: [
            {
             id: 'Kullanici_yetki_id',
             text: 'Izin verilen Kullanici Listelesi',
             iconCls:'icon-grid-del',            
             listeners : {

                click : function(){
                    rec_dosya   = fileGrid_yp_is.getSelectionModel().getSelected();
                    rec_dosya=rec_dosya.data.id;
                    alert(rec_dosya);
                    deleteCookie('icerik_id');
                    setCookie('icerik_id',rec_dosya,365);
                //  alert(rec_dosya);

                //usersListWin.extraP = { a:11231231, b: 1, c: 2}; // Add additional stuff
          user_store.reload();
          usersListWin.show();



                }

            }
        },
        ]
    }),
    listeners: {
        celldblclick : function(gridim,rIndex,cIndex,e) {
            rec_dosya   = fileGrid_yp_is.getSelectionModel().getSelected();
             deleteCookie('icerik_id');
                    setCookie('icerik_id',rec_dosya,365);
             this.contextMenu.showAt(e.getXY());
        }
    },

    store: fileStore_yp_is,
    sm: new Ext.grid.RowSelectionModel({
        singleSelect:true
    }),
    trackMouseOver: true,
    frame:false,
    width:'auto',
    height:'auto',
    autoScroll : true,
    tbar:tbarim
});
店内

我尝试在baseparams(icerik_id)中使用getcookie来获取数据


与哪个版本一起使用?看起来像是基于如何实例化类的ExtJS3。并在发布代码时使用代码标签。您不能期望其他用户每次都为您这样做。然后,作为第一件事,您不应该使用
new
关键字,请使用
Ext.create()取而代之!
var user_store = new Ext.data.JsonStore({
    root: 'rows',
    autoLoad: true,
    model: 'users',
    totalProperty: 'results',
    remoteSort: true,
    proxy: new Ext.data.HttpProxy({
       url: 'phps/kullanici_islemleri.php',
       method:'POST'

    }),
    baseParams:{
          action:'yetki',
          icerik_id:getCookie('icerik_id')
    },
    fields: [{
            name :'id'
        },{
            name :'icerik_id'
        },{
            name:'username'
        },{
            name:'rol'
        },{
            name:'gorme'
        },{
            name:'olusturma'
        },{
            name:'silme'
        }
    ]
});