cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with TreeByNestingTableColumn

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ingo,

Looks correct.

What are settings for "hasChildren" and "isExpanded" for TreeByNestingTableColumn UI control?

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

P.S. Next time please replace Java single line comments (//comment) to multiline comments (/comment/).

Former Member
0 Kudos

It seems I forgot the MasterColumn. I' going to

try it again. Perhaps it will work this time.

Thanks.

Former Member
0 Kudos

Good luck!

Also... Welcome to SDN!

And please read this https://www.sdn.sap.com/irj/sdn/crphelp

VS

Answers (0)