Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#847 closed enhancement (fixed)

the TreeLoadingController does not support multiple levels of nodes

Reported by: anonymous Owned by: ilia
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: TreeLoadingController Cc:
Blocked By: Blocking:

Description

"TreeLoadingController?" and the "loadProcessResponse".

It would be great if the "loadProcessResponse" function could load more than one level of nodes when the response contains them. It would be faster than calling back the server.

Actually:

[{"isFolder":true,"title":"TEST1"},{"isFolder":true,"title":"TEST2"}]

What would be great:

[{"isFolder":true,"title":"TEST1",{"isFolder":true,"title":"TEST3"}},{"isFolder":true,"title":"TEST2"}]

Actually, the code looks like this:

var newChildren = result;

if (!dojo.lang.isArray(newChildren)) {
   dojo.raise('loadProcessResponse: Not array loaded: '+newChildren);
}

for(var i=0; i<newChildren.length; i++) {
  // looks like dojo.widget.manager needs no special "add" command
  newChildren[i] = dojo.widget.createWidget(node.widgetType, newChildren[i]);
  node.addChild(newChildren[i]);
}

It would be great if that part was called recursively as long as the newChildren contains more children

Thx.

Change History (3)

comment:1 Changed 13 years ago by bill

Milestone: 0.3.10.4
Owner: changed from anonymous to ilia

comment:2 Changed 13 years ago by ilia

Resolution: fixed
Status: newclosed

Can be done with TreeV3

comment:3 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.