exttree在strut2中实现异步树

这是一个介绍用ext在strut2 中实现异步树的文档,希望大家喜欢

利用ExtJS Tree的TreeNode在Struts 2中实现Ajax真正的动态异步加载树

Ext.onReady(function(){

Ext.BLANK_IMAGE_URL =

'../ext-2.0.2/resources/images/default/s.gif'; // 根据项目中 s.gif 所在的目录设置

Ext.QuickTips.init();

// shorthand

var Tree = Ext.tree;

var loader = new Tree.TreeLoader({

dataUrl: '' // 可以是

'../admin/dicEmployeeList.action?skey=9039',而不改变该参数,只要在每次调用 Action 之前传入所需的参数

});

// set the root node

var root = new Tree.AsyncTreeNode({

id :'root',

text: 'Root'

,expanded: true

,draggable: false, // disable root node dragging

hrefTarget: 'centerFrame' // Target frame for the link

});

var tree = new Tree.TreePanel({

id :'tree'

,root: root

,rootVisible :false,

autoScroll: true, animate: true,

containerScroll: true, border :false,

enableDD: true,// dropConfig: {appendOnly: true},

margins :'5 5 4 5', title :'ManagerSystem',

loader: loader,

bodyStyle :'background:#fff

url(../images/bgImage/treeBg200.gif) repeat-x 0 0;'

});

// root.href = 'userinfo/viewUserInfo.html'; // URL of the link used for this node

免费下载该文档:exttree在strut2中实现异步树
相关文档