Ticket #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 |
| Severity: | normal | Keywords: | TreeLoadingController |
| Cc: |
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
Note: See
TracTickets for help on using
tickets.