求大神,怎么从store里面拿到数据给panle设置titleext4数据stroepanletitle

解决方案 »

  1.   

    你这个store的load方法向后台发出请求,然后listeners:{
      load:function(records){
        panel.setTitle(records[0].get('title'));
    }
    }或者store里已经有数据了
    那么久var records =  store.getrange();
    遍历取出你想要的title
    然后setTilte
      

  2.   

    我用的是Ext4.0 mvc模式。在外面定义了一个json文件。我在view层stroe:xxx(我定义的stroe名字)。那要怎么使用呢?
      

  3.   


    我用的是Ext4.0 mvc模式。在外面定义了一个json文件。我在view层stroe:xxx(我定义的stroe名字)。那要怎么使用呢?
      

  4.   


    我用的是Ext4.0 mvc模式。在外面定义了一个json文件。我在view层stroe:xxx(我定义的stroe名字)。那要怎么使用呢?
    不是一样么
    你在view的init方法里或者构造函数里,
    var me =this;
    me.sotre.on('load',funtion(){me.setTitle(....)
    })