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

📄 firsttree4.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>Changing the open and close icons</h1>    <div class="note">        This page demonstrates how to supply custom open and close icons        to the <code>TreeNodeView</code>.    </div>    <p>        It's really quite simple to change the open and close icons in        the tree:    <table border="1">        <tr>            <td valign="top">                <span class="tree" jwcid="treeView">                    <span jwcid="treeDataView">                        <span jwcid="treeNodeView"/>                    </span>                </span>            </td>        </tr>        <tr>            <td colspan="4">               <code class="highlight"><span jwcid="@Insert" value="ognl:lastNodeSelectedMsg"/></code>            <td>        </tr>        </table>    <p>        Here are the relevent snippets from <code>FirstTree4.page</code>        that change the open and close icons:<div class="code"><pre><code class="highlight">    &lt;context-asset name="closeNodeImage" path="images/TreeClosed.gif"/&gt;    &lt;context-asset name="openNodeImage" path="images/TreeOpen.gif"/&gt;</code>    &lt;component id="treeNodeView" type="contrib:TreeNodeView"&gt;        &lt;binding name="treeDataView" expression='components.treeDataView'/&gt;        &lt;binding name="makeNodeDirect" expression="true"/&gt;<code class="highlight">        &lt;binding name="closeNodeImage" expression="assets.closeNodeImage"/&gt;        &lt;binding name="openNodeImage" expression="assets.openNodeImage"/&gt;</code>    &lt;/component&gt;</pre></div><p>    Unfortunately, TreeNodeView does not differentiate between nodes    that have children and leaf nodes.  The same icons will be displayed    for every node.  If this doesn't meet your needs you will have to    create some custom Java classes.<p>    If you do not want open and close icons to be displayed, add the     following binding to the <code>"treeNodeView"</code> component:<div class="code"><pre>    &lt;binding name="showNodeImages" expression="false"/&gt;</pre></div>    <p><a href="#" jwcid="@PageLink" page="Home">Return to Home Page...</a></body></html>

⌨️ 快捷键说明

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