cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically deleting Nodes?

Former Member
0 Kudos

Hi,

How can I delete dynamically created nodes during the execution of the application?

Regards

MK

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi MK,

Use

wdContext.getContext().reset();

OR

wdContext.getContext().reset(true);

Regards,

Shubham

Former Member
0 Kudos

Hi Shubham,

But where is the reference to the node created in

wdContext.getContext...

The statically created context nodes must remain intact.

Only the dynamically created one must be deleted.

Former Member
0 Kudos

Hi MK,

The above statements, will do the following.

Arbitrarily resets the context to its initial state. All nodes are invalidated, and all dynamically added nodes and attributes are destroyed from the metadata.

They will clear the data in all the Value Nodes created at design time also.

So, if you want to only delete the dynamic nodes and still keep the data in the Static nodes created at design time use:

wdContext.getContext.reset(false);

While using this statements, you don't have to specify the name of the dynamic nodes you want to delete. It will delete all the dynamic nodes.

Regards,

Shubham

Answers (0)