Dynamically Remove Node from ChildFactory.Detachable

252 Views Asked by At

I am currently working on Outline View, where I creating children by using ChildFactory.Detachable, which is working properly.

I implemented the PropertyChangeListener on this ChildFactory where I dynamically adding and removing the nodes given below

public void propertyChange(PropertyChangeEvent evt) {     
    if ("ADD".equals(evt.getPropertyName())) {
        this.refresh(false);
    } else if ("REMOVE".equals(evt.getPropertyName())) {
        this.refresh(false);
    } 
}

Here the structure is RootNode and its child nodes and child node also can contain its own child nodes. The problem is, whenever I try to remove the node from any root node the expansion sign(+) is not removed.

I gone through the "No Expansion Icon When No Children (Part 1) - Blog | /Oracle" from Geertjan's Blog but its for adding new node and not removing.

If anybody has any idea about it please let me know.

Thanks is advance.

0

There are 0 best solutions below