01: package simpleorm.simplewebapp.eg.simple;
02:
03: import simpleorm.simplewebapp.core.WTree;
04: import simpleorm.simplewebapp.core.WPage;
05: import simpleorm.simplewebapp.core.WPagelet;
06:
07: public class WTreePage extends WPage {
08:
09: public final WTreePagelet pagelet = new WTreePagelet(this );
10:
11: public WTree getTree() {
12: return pagelet.tree;
13: }
14:
15: public static class WTreePagelet extends WPagelet {
16:
17: WTree tree = new WTree();
18:
19: public WTreePagelet(WPage wpage) {
20: super (wpage, "tree");
21: }
22:
23: protected void onPreMaybeSubmitted() {
24: WTree.WTreeNode p = tree.addNode(null, "First",
25: "treetest.jsp");
26: WTree.WTreeNode s = tree.addNode(p, "Sub1", "treetest.jsp");
27: tree.addNode(s, "SubSub", "treetest.jsp");
28: tree.addNode(p, "Sub2", "treetest.jsp");
29: tree.addNode(null, "Second", "treetest.jsp");
30: }
31:
32: }
33: }
|