Dennis
(Dennis Oleshko)
1
Hey!
I got a problem. Whenever I use not a String type at Tree it doesn’t sets Parent correctly.
For example I have objects Like this
object1
… object2
… object3
object 4
… object5
object 6
… object 7
… object 8
tree will build it like this:
object1
object1
object2
object3
object 4
object5
object 6
object 7
object 8
Can anybody help me please?
Keith7
(Keith Istler)
2
I just worked this out, this is what I did.
public class NavigationTree extends Tree {
public static final Object SHOW_ALL = "Show all";
public static final Object SEARCH = "Search";
public static final String strTest1 = "test1";
Item showAllItem;
Item searchItem;
public NavigationTree(FeedApplication app) {
super("My Tree");
showAllItem = addItem(SHOW_ALL);
setChildrenAllowed(SHOW_ALL, false);
searchItem = addItem(SEARCH);
setChildrenAllowed(SEARCH, true);
addSearch(strTest1, "MyTest");
}
public void addSearch(String url, String name) {
addItem(url);
setParent(url, SEARCH);
setItemCaption(url, name);
setChildrenAllowed(url, false);
}
}