⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 firsttree.html

📁 经典Tapestry教程 经典Tapestry教程
💻 HTML
字号:
<html jwcid="@Shell" title="Using The Tapestry Tree Control" stylesheet="ognl:assets.stylesheet"><head jwcid="@Block">    <link rel="stylesheet" type="text/css" href="../css/style.css"/></head><body jwcid="@Body">    <h1>First Tree</h1>    <div class="note">        This page demonstrates how to use the Tree components to implement         a simple tree.    </div>    The simple tree that follows uses the <code>contrib:TreeView</code>,    <code>contrib:TreeDataView</code> and <code>contrib:TreeView</code>    components.  Click on the nodes to expand and contract the tree.    <table border="1">        <tr>            <td valign="top">                <span class="tree" jwcid="treeView">                    <span jwcid="treeDataView">                        <span jwcid="treeNodeView"/>                    </span>                </span>            </td>        </tr>    </table>    <p>        The files <code>FirstTree.html</code>, <code>FirstTree.page</code>,        <code>FirstTreePage.java</code> and <code>StringTreeNode.java</code>        are used to implement this page.    <p>        Here is a snippet from <code>FirstTree.html</code> that shows how the        tree is set up on the HTML template:<div class="code"><pre>    &lt;span class="tree" jwcid="treeView"&gt;        &lt;span jwcid="treeDataView"&gt;            &lt;span jwcid="treeNodeView"/&gt;        &lt;/span&gt;    &lt;/span></pre></div>            <p>        Here is a snippet from <code>FirstTree.page</code> that shows how the        tree is set up:<div class="code"><pre>    &lt;component id="treeView" type="contrib:TreeView"&gt;        &lt;binding name="treeModel" <code class="highlight">expression='treeModel'</code>/&gt;        &lt;binding name="treeStateListener" expression='treeStateListener'/&gt;    &lt;/component&gt;    &lt;component id="treeDataView" type="contrib:TreeDataView"&gt;        &lt;binding name="treeView" expression='components.treeView'/&gt;        &lt;binding name="value" expression='value'/&gt;    &lt;/component&gt;    &lt;component id="treeNodeView" type="contrib:TreeNodeView"&gt;        &lt;binding name="treeDataView" expression='components.treeDataView'/&gt;        &lt;binding name="makeNodeDirect" expression="true"/&gt;    &lt;/component&gt;</pre></div>            <p>        The expression <code>'treeModel'</code> resolves        to the method <code>getTreeModel()</code> in <code>FirstTreePage.java</code>.        Before examining that code, we need to discuss the objects that provide        data to the tree components.    <p>            To use <code>contrib:TreeView</code> on a page, you must first create a populated TreeModel         by performing the following steps:        <ul>            <li>Create a class that implements the ITreeNode interface</li>            <li>Create a "tree" of ITreeNode objects</li>            <li>Create an ITreeDataModel object to wrap the "tree"</li>            <li>Create an ITreeModel that wraps the ITreeDataModel</li>                            </ul>    <p>        <a href="#" jwcid="@PageLink" page="FirstTree1">Creating a class that implements ITreeNode...</a>    <p>        <a href="#" jwcid="@PageLink" page="Home">Return to Home Page...</a></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -