dynamictreenode.xhtml
来自「OperaMasks是一种基于J2EE的Web开发技术」· XHTML 代码 · 共 66 行
XHTML
66 行
<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
xmlns:ajax="http://www.apusic.com/jsf/ajax" renderKitId="AJAX"
xmlns:h="http://java.sun.com/jsf/html">
<w:page title="增加,删除,修改树节点">
<w:head>
<w:stylesheet src="/common/resources/examples.css" />
</w:head>
<w:form transient="true">
<div class="examDesc">
<p>本例演示动态树,树的节点添加、修改、删除</p>
</div>
<layout:panelGrid columns="2">
<layout:cell colspan="1" rowspan="1" valign="top">
<w:tree id="tree" style="height:100%;width:100%;" width="200" height="400" autoScroll="true" border="true">
<w:treeNode text="root" userData="root" icon="images/my_computer.gif"></w:treeNode>
</w:tree>
</layout:cell>
<layout:cell colspan="1" rowspan="1" valign="top">
<layout:panelGrid columns="3" width="300">
<layout:cell colspan="1" rowspan="1">
文本:
</layout:cell>
<layout:cell colspan="2" rowspan="1">
<w:textField id="text"></w:textField>
</layout:cell>
<layout:cell colspan="1" rowspan="1">
图标:
</layout:cell>
<layout:cell colspan="2" rowspan="1">
<w:combo id="icon">
<f:selectItem itemLabel="我的电脑" itemValue="images/my_computer.gif" />
<f:selectItem itemLabel="文档文件夹" itemValue="images/my_documents.gif" />
<f:selectItem itemLabel="音乐文件夹" itemValue="images/my_music.gif" />
<f:selectItem itemLabel="图片文件夹" itemValue="images/my_pictures.gif" />
<f:selectItem itemLabel="磁盘" itemValue="images/cd_drive.gif" />
<f:selectItem itemLabel="图片" itemValue="images/document_jpg.gif" />
<f:selectItem itemLabel="音乐" itemValue="images/document_music.gif" />
<f:selectItem itemLabel="文档" itemValue="images/document_word.gif" />
</w:combo>
</layout:cell>
<layout:cell colspan="1" rowspan="1">
勾中:
</layout:cell>
<layout:cell colspan="2" rowspan="1">
<w:combo id="checked">
<f:selectItem itemLabel="没有勾选框" itemValue="none" />
<f:selectItem itemLabel="勾中" itemValue="checked" />
<f:selectItem itemLabel="不勾中" itemValue="unchecked" />
</w:combo>
</layout:cell>
<layout:cell colspan="2" rowspan="1">
<w:button value="增加" id="addNode" width="75" />
<w:button value="删除" id="deleteNode" width="75" />
<w:button value="修改" id="modifyNode" width="75" />
<w:button value="展开所有" id="expandAll" width="75" />
<w:button value="收缩所有" id="collopseAll" width="75" />
</layout:cell>
</layout:panelGrid>
</layout:cell>
</layout:panelGrid>
<h:outputText id="response" escape="false"></h:outputText>
</w:form>
</w:page>
</f:view>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?