I am able to dynamically add nodes using wdContext.getNodeInfo().addChild("AAAAA",......);
But i am not able to find an API to delete this node.
I am able to delete NodeElements, but how do i delete IWDNodes ?? I have cheked out the IWDNodeInfo , IWDNode API's but cant find anything suitable.
The only way is to call wdContext.getContext().reset() method. This will remove <b>ALL</b> dynamically added nodes and attributes. There is no way currently to remove them selectively.
The practice we apply is to encapsulate dynamically manipulated context nodes to separate custom controller to minimize negative impact of <i>reset</i> call and following reconstruction of nodes. Sure, "one node - one controller" approach is overkill, but we strive to keep them at minimum, and, moreover, use nodes hierarchies whenever possible.
Things get even worth for View controller. We all forced to use view controllers because it is impossible to bind UI elements to anything except view controller context. Generally, we also try to extract such context along with UI elements in separate view and then use view composition in window to merge individual parts. Obviously, sometimes this affects original layout design