1
我有一个extjs TreePanel,我需要使用从我的Ext.data.JsonStore调用返回的json数据(跨域调用)加载。这是完美的。我只是找不到一种方法来使用返回的jsonStore来加载treepanel。有任何想法吗?我是真正的亡命之徒。extjs:通过从Ext.data.JsonStore返回的JSON加载树
谢谢大家!
代码片段:
var store = new Ext.data.JsonStore({
root: 'topics',
totalProperty: 'totalCount',
idProperty: 'threadid',
remoteSort: true,
fields: [
'title', 'forumtitle', 'forumid', 'author',
{name: 'replycount', type: 'int'},
{name: 'lastpost', mapping: 'lastpost', type: 'date', dateFormat: 'timestamp'},
'lastposter', 'excerpt'
],
proxy: new Ext.data.ScriptTagProxy({
url: 'http://other.domain/test.aspx'
})
});
//现在我需要使用那家商店加载树...
var Tree = Ext.tree;
var tree = new Tree.TreePanel({
useArrows: true,
autoScroll: true,
animate: true,
enableDD: true,
containerScroll: true,
border: false,
loader: new Tree.TreeLoader({ dataUrl: '????' })
//.....
});
帮助!
嘿劳埃德 - 我喜欢及时的回应。任何代码片段或网址可能帮助我的机会? – lance 2010-10-01 14:34:33