1、Ext.tree.TreePanel
主要配置项:
root:树的根节点。
rootVisible:是否显示根节点,默认为true。
useArrows:是否在树中使用Vista样式箭头,默认为false。
lines:是否显示树线,默认为true。
loader:树节点的加载器,默认为Ext.tree.TreeLoader。
selModel:树的选择模式,默认为Ext.tree.DefaultSelectionModel。
pathSeparator:树节点路径的分隔符,默认为“/”。
singleExpand:是否一次只展开树中的一个节点,默认为true。
requestMethod:请求方法,可选值有POST、GET。
containerScroll:是否将树形面板注册到滚动管理器ScrollManager中。
主要方法:
collapseAll():收缩所有树节点
expandAll():展开所有树节点
getRootNode():获取根节点
getNodeById(String
id):获取指定id的节点
expand(
[Boolean deep], [Boolean anim], [Function callback], [Object scope] )
expandPath(
String path, [String attr], [Function callback] )
getChecked(
[String attribute], [TreeNode startNode] )
selectPath(
String path, [String attr], [Function callback] )
getSelectionModel():
2、Ext.data.Node
id):获取指定id的节点
[Boolean deep], [Boolean anim], [Function callback], [Object scope] )
String path, [String attr], [Function callback] )
[String attribute], [TreeNode startNode] )
String path, [String attr], [Function callback] )
2、Ext.data.Node