Tree.jsp Sample

This topic inludes the source code for the Tree.jsp Sample.

Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui/tree/

Sample Source Code


01 <%@ taglib uri="netui-tags-html.tld" prefix="netui" %>
02 <html>
03 <head>
04 <title>Tree Tag</title>
05 <netui:base />
06 </head>
07 <body bgcolor="#ccffcc">
08     <netui:tree 
09         tree="{session.tree}" 
10         imageRoot="treeImages" 
11         style="tree-control" 
12         action="treeState">
13        <netui:node label="Root Folder" expanded="true" action="treeState" target="contentFrame">
14             <netui:node label="I" expanded="false" action="treeState" target="contentFrame">
15                 <netui:node label="A" expanded="false" action="treeState" target="contentFrame">
16                     <netui:node label="1" action="treeState" target="contentFrame"/>
17                     <netui:node label="2" action="treeState" target="contentFrame"/>
18                 </netui:node>
19                 <netui:node label="B" expanded="false" action="treeState" target="contentFrame">
20                     <netui:node label="1" action="treeState" target="contentFrame"/>
21                     <netui:node label="2" action="treeState" target="contentFrame"/>
22                 </netui:node>
23                 <netui:node label="C" expanded="false" action="treeState" target="contentFrame">
24                     <netui:node label="1" action="treeState" target="contentFrame"/>
25                     <netui:node label="2" action="treeState" target="contentFrame"/>
26                 </netui:node>
27             </netui:node>
28             <netui:node label="II" expanded="false" action="treeState" target="contentFrame">
29                 <netui:node label="A" expanded="false" action="treeState" target="contentFrame">
30                     <netui:node label="1" action="treeState" target="contentFrame"/>
31                     <netui:node label="2" action="treeState" target="contentFrame"/>
32                 </netui:node>
33                 <netui:node label="B" expanded="false" action="treeState" target="contentFrame">
34                     <netui:node label="1" action="treeState" target="contentFrame"/>
35                     <netui:node label="2" action="treeState" target="contentFrame"/>
36                 </netui:node>
37                 <netui:node label="C" expanded="false" action="treeState" target="contentFrame">
38                     <netui:node label="1" action="treeState" target="contentFrame"/>
39                     <netui:node label="2" action="treeState" target="contentFrame"/>
40                 </netui:node>
41             </netui:node>            
42         </netui:node>
43     </netui:tree>  
44 <hr />  
45 <netui:anchor target="_top" href="/WebApp/tagSamples/tagSamplesController.jpf" style="font-size:8pt;color:#ff0000;">Return to Tag Samples</netui:anchor>
46 </body>
47 </html>