| Issue 118: | Ajax tree does not update last node css if node has no children | |
| 2 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. Create a tree from an ajax source.
2. Expand a node, if that node has no children the node shows incorrect
img, should be the img that says the node has no children and expanded.
(If possible, please attach an example HTML file, that works when copied
into the dynatree/doc/ folder.)
What is the expected output? What do you see instead?
What version of the product are you using?
On what operating system and browser?
Ubuntu, FF 3.5
Please provide any additional information below.
Have fixed by adding code to
appendAjax: function(ajaxOptions) {}
if (data.length==0) {
self.aChilds=null;
self.data.isLazy=false;
self.render(true,false);
}
Have added this code after self.setLazyNodeStatus(DTNodeStatus_Ok);
Sep 3, 2009
#1
chrisyou...@googlemail.com
Sep 9, 2009
(No comment was entered for this change.)
Status:
Accepted
Owner: moo...@wwWendt.de Labels: Milestone-Release0.5.2
Sep 19, 2009
This was introduced recently.
I removed an extra attribute ('node was loaded'), because it felt somewhat redundant.
Now isLazy + 'childlst==null' is interpreted as 'not yet loaded'.
The idea was, that a server should not set the 'isLazy' flag for empty parent nodes
anyway.
This would provide better usabiltity, since the user doesn't have to expand a node,
just to find that it is empty.
Objections?
Labels:
-Type-Defect Type-Enhancement
Sep 21, 2009
Well I think it depends on how each tree node is returned by the server. In our case, each node represents a row in a database, and the only way to determine if a node has children is to perform an sql query. This keeps the tree nice and quick by only reading in necessary nodes, the user has to expand downwards to navigate to where they want to be. The server will perform sql selects along the way to determine if the nodes have children or not. If each node had to know whether it has children, then we would have to peform sql counts for each child node. And each of those child nodes would need to know whether they have children, performing more database selects etc etc. In effect building up the whole tree. By the way, I think the dynatree is fantastic, thank you for your continued support of it.
Sep 22, 2009
From a point of usability I personally would prefer to let the backend do some additional work instead of leaving it up to the user ;-) But of course you're right: there may be scenarios were this is too expensive. I will look into it. Maybe an empty list [] can be treated as read, while children=null means unread.
Dec 12, 2009
Issue 125 has been merged into this issue.
Dec 20, 2009
Defered to next update, so drag'n'drop sample is not blocked.
Labels:
Milestone-Release0.5.3
Mar 15, 2010
(No comment was entered for this change.)
Labels:
Milestone-Release0.5.4
May 30, 2010
deferred to 0.5.5
Labels:
Milestone-Release0.5.5
Nov 7, 2010
(No comment was entered for this change.)
Status:
Fixed
Labels: -Milestone-Release0.5.5 Milestone-Release1.0
Jul 17, 2012
considered verified
Status:
Verified
|