on 05-31-2006 10:45 PM
When I try to remove a child of a recursive node, removeElement method always returns false and does not remove the child node. What am I doing wrong?
Please see code below
IPrivateFirecallSetup.IFirecallConfigurationElement roleElement = wdContext.currentFirecallConfigurationElement();
IPrivateFirecallSetup.IFirecallConfigurationElement userElement = roleElement.currentChildNodeElement();
wdContext.nodeFirecallConfiguration().clearSelection();
boolean removeResult = wdContext.nodeFirecallConfiguration().removeElement(userElement);
Thanks,
Raj Balakrishnan
Raj,
Hint: node.removeElement(el) works if and only if el is element of node, i.e. el.node() == node. You are breaking this rule.
Try this:
IPrivateFirecallSetup.IFirecallConfigurationElement roleElement = wdContext.currentFirecallConfigurationElement();
IPrivateFirecallSetup.IFirecallConfigurationElement userElement = roleElement.currentChildNodeElement();
wdContext.nodeFirecallConfiguration().clearSelection();
boolean removeResult = wdContext.<b>currentFirecallConfigurationElement().nodeChild()</b>.removeElement(userElement);
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.