IDEMPIERE-285 Zk: Tree model change event ( add, update and delete ) fire twice
This commit is contained in:
parent
83a4fbaf48
commit
4ad18e38e4
|
@ -167,7 +167,6 @@ public class SimpleTreeModel extends org.zkoss.zul.DefaultTreeModel implements T
|
||||||
public void addNode(DefaultTreeNode newNode) {
|
public void addNode(DefaultTreeNode newNode) {
|
||||||
DefaultTreeNode root = (DefaultTreeNode) getRoot();
|
DefaultTreeNode root = (DefaultTreeNode) getRoot();
|
||||||
root.getChildren().add(newNode);
|
root.getChildren().add(newNode);
|
||||||
fireEvent(TreeDataEvent.INTERVAL_ADDED, getPath(root), root.getChildCount() - 1, root.getChildCount() - 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -195,7 +194,6 @@ public class SimpleTreeModel extends org.zkoss.zul.DefaultTreeModel implements T
|
||||||
|
|
||||||
|
|
||||||
parentNode.getChildren().remove(path[index]);
|
parentNode.getChildren().remove(path[index]);
|
||||||
fireEvent(TreeDataEvent.INTERVAL_REMOVED, getPath(parentNode), path[index], path[index]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +265,6 @@ public class SimpleTreeModel extends org.zkoss.zul.DefaultTreeModel implements T
|
||||||
}
|
}
|
||||||
|
|
||||||
parent.getChildren().add(index, newNode);
|
parent.getChildren().add(index, newNode);
|
||||||
fireEvent(TreeDataEvent.INTERVAL_ADDED, getPath(parent), index, index);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue