on 01-31-2006 10:18 AM
Hi All,
I've got a problem with the NestingTree. I read a tree out of the DB and get a tree with nodes and subnodes.
So I go recursively through the tree and try to add nesting columns like this.
public void addChildren(
IPrivateEditKkView.INodesElement parent,
Tree tree) {
//@@begin addCatalogEntries()
try {
IPrivateEditKkView.INodesNode childNode = null;
IPrivateEditKkView.INodesElement childNodeElement = null;
//absolute root element
if (parent == null) {
childNode = wdContext.nodeNodes();
childNodeElement = null;
} else {
childNode = parent.nodeChild();
childNodeElement = null;
}
//lese Kinder aus
List childList = tree.getChildren();
//füge aktuellen Knoten zum WD-Tree hinzu
// ... neuer Knoten
childNodeElement = childNode.createNodesElement();
// ... fülle neuen Knoten
childNodeElement.setId(Long.toString(tree.getId()));
childNodeElement.setName(tree.getName());
childNodeElement.setDescription(tree.getDescription());
// ... hänge Knoten in den Baum
childNode.addElement(childNodeElement);
//wenn der Elternknoten Kinder hat starte Rekursion
if (childList.size() > 0) {
//füge alle Kinder hinzu
for (int i = 0; i < tree.getChildren().size(); i++) {
addChildren(childNodeElement, (Tree) childList.get(i));
}
}
} catch (SQLException e) {
e.printStackTrace();
}
}
But what I get is the header and one row only.
Does someone can help me please?
Regards, Ingo
Ingo,
Looks correct.
What are settings for "hasChildren" and "isExpanded" for TreeByNestingTableColumn UI control?
Valery Silaev
EPAM Systems
P.S. Next time please replace Java single line comments (//comment) to multiline comments (/comment/).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.