JavaScud | Forum | JIRA | Blog |
  Dashboard > WebWork2文档中文化计划 > ... > Non Form Tags > tree
  WebWork2文档中文化计划 Log In View a printable version of the current page.  
  tree
Added by scud, last edited by scud on May 18, 2006  (view change)
Labels: 
(None)

描述

输出一个支持AJAX的树型组件.

属性

名称 必填 缺省值 类型 描述
toggle false   Object/String toggle 属性.
treeSelectedTopic false   Object/String treeSelectedTopic 属性.
treeExpandedTopic false   Object/String treeExpandedTopic 属性.
treeCollapsedTopic false   Object/String treeCollapsedTopic 属性.
openAll false false boolean openAll 属性.
rootNode false   Object/String rootNode 属性.
childCollectionProperty false   Object/String childCollectionProperty 属性.
nodeTitleProperty false   Object/String nodeTitleProperty 属性.
nodeIdProperty false   Object/String nodeIdProperty 属性.
openTemplate false   Object/String 设置输出Html的开始部分(opening)的模板.
theme false   Object/String 输出元素时使用的主题(theme)(不使用缺省的)
template false   Object/String 输出元素时使用的模板(template)(不使用缺省的)
cssClass false   Object/String 输出元素时的class属性
cssStyle false   Object/String 输出元素时的css样式定义(译者注:html元素的style属性)
title false   Object/String 在输出元素时设置html属性title
disabled false   Object/String 在输出元素时设置html属性disabled
label false   Object/String 用于输出一个元素对应的label的表达式
labelPosition false left Object/String 不赞成使用.
labelposition false   Object/String 定义元素标签的位置(top/left)
requiredposition false   Object/String 定义required属性输出的位置(left|right)
name false   Object/String 元素的名字
required false false Boolean 如果设置为true, 在输出标签时将显示出此字段是必须输入的(译者注:如果使用默认模板,将会标示为"*")
tabindex false   Object/String 在输出元素时设置html属性tabindex
value false   Object/String 预设input元素的value属性.
onclick false   Object/String 在输出元素时设置html属性onclick
ondblclick false   Object/String 在输出元素时设置html属性ondblclick
onmousedown false   Object/String 在输出元素时设置html属性onmousedown
onmouseup false   Object/String 在输出元素时设置html属性onmouseup
onmouseover false   Object/String 在输出元素时设置html属性onmouseover
onmousemove false   Object/String 在输出元素时设置html属性onmousemove
onmouseout false   Object/String 在输出元素时设置html属性onmouseout
onfocus false   Object/String 在输出元素时设置html属性onfocus
onblur false   Object/String 在输出元素时设置html属性onblur
onkeypress false   Object/String 在输出元素时设置html属性onkeypress
onkeydown false   Object/String 在输出元素时设置html属性onkeydown
onkeyup false   Object/String 在输出元素时设置html属性onkeyup
onselect false   Object/String 在输出元素时设置html属性onselect
onchange false   Object/String 在输出元素时设置html属性onchange
tooltip false   String 设置元素的tooltip属性(译者注:tooltip为工具栏提示)
tooltipConfig false   String 设置tooltip属性的配置
id false   Object/String id是定位元素时使用的. 对于UI和表单标签它会被用作HTML的id属性

例子

<tree .../>

例子,太简单了吧。

Posted by Anonymous at Jan 18, 2008 11:43 | Reply To This

太简单了吧,能稍微复杂点吗?

Posted by Anonymous at Mar 14, 2008 09:43 | Reply To This

<s:tree theme="ajax" id="root" label="Root">
<s:treenode theme="ajax" id="child1" label="<b>Child 1</b>">
<s:treenode theme="ajax" id="subchild11" label="SubChild 1" />
<s:treenode theme="ajax" id="subchild12" label="SubChild 2" />
<s:treenode theme="ajax" id="subchild13" label="SubChild 3" />
</s:treenode>
<s:treenode theme="ajax" id="child2" label="<b>Child 2</b>">
<s:treenode theme="ajax" id="subchild21" label="SubChild 1" />
<s:treenode theme="ajax" id="subchild22" label="SubChild 2" />
<s:treenode theme="ajax" id="subchild23" label="SubChild 3" />
</s:treenode>
</s:tree>

Posted by Anonymous at Jun 30, 2008 11:14 | Reply To This

能不能做一个带复选框的树呢?

Posted by Anonymous at Nov 17, 2008 17:06 | Reply To This
Site running on a free Atlassian Confluence Open Source Project License granted to WebWork China. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.3 Build:#808 May 29, 2007) - Bug/feature request - Contact Administrators