mariusz.pala
19 Jun 2009, 12:20 AM
Hi,
I have an async tree and I wrote my own expandPath(...) method, since the original one doesn't work with async tree. The problem is that I have to select the last node at the end. Everything is be fine when the last node contains some subnodes, but the problem is that the Expand event is not fired when there is no children nodes:
public void expand() {
if (item.root) {
return;
}
updateJointStyle();
if (item.getItemCount() == 0) {
return;
}
onIconStyleChange("");
if (item.tree.getAnimate()) {
animExpand();
} else {
containerEl.setVisible(true);
afterExpand();
}
}But why? The node is expanded, it just doesn't contain any childs. Without that event I'm not able to verify if the last node is expanded or not. So wheter the process is finished or not (there is no other event to listen).
Can you change this code as below:
if (item.getItemCount() == 0) {
afterExpand();
return;
}Thanks,
Mariusz
I have an async tree and I wrote my own expandPath(...) method, since the original one doesn't work with async tree. The problem is that I have to select the last node at the end. Everything is be fine when the last node contains some subnodes, but the problem is that the Expand event is not fired when there is no children nodes:
public void expand() {
if (item.root) {
return;
}
updateJointStyle();
if (item.getItemCount() == 0) {
return;
}
onIconStyleChange("");
if (item.tree.getAnimate()) {
animExpand();
} else {
containerEl.setVisible(true);
afterExpand();
}
}But why? The node is expanded, it just doesn't contain any childs. Without that event I'm not able to verify if the last node is expanded or not. So wheter the process is finished or not (there is no other event to listen).
Can you change this code as below:
if (item.getItemCount() == 0) {
afterExpand();
return;
}Thanks,
Mariusz