ExtJS 的comboTree的显示值问题

Posted on 2009-09-01 18:18 Robert Su 阅读(1465) 评论(0)  编辑  收藏
问题描述:
网上关于extjs的comboTree已经层出不穷了
利用tpl显示tree不是问题
关键是combo的显示值
网上的例子多是

comboxWithTree.setValue(node.id);
但是这样的显示跟post值不一样

tree1.on('click',function(node){
       
        var Record = Ext.data.Record.create(
            {name: 'id', mapping: 'id'},
            {name: 'text', mapping: 'text'}
       ) ;
       var t = new Record({
            id: node.id,
            text: node.text
            }
       )
     
       comboxWithTree.getStore().add(t);
       console.debug(comboxWithTree.getStore().data);
       comboxWithTree.setValue(node.id);
       comboxWithTree.collapse();
    });


只有注册用户登录后才能发表评论。


网站导航:
 

posts - 103, comments - 104, trackbacks - 0, articles - 5

Copyright © Robert Su