cancel
Showing results for 
Search instead for 
Did you mean: 

Removing all elements from the context node

Former Member
0 Kudos

Hi All,

I want to clear/remove all elements from the contextNode

I tried the following but it does not work. Any idea of how we could achive this.

wdContext.nodeSelectedArticles().clearSelection();

Thanks,

Tarun.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tarun,

If your requirement is to clear all the elements of the SelectedArticles node, the following statement should help you:

wdContext.nodeSelectedArticles().invalidate();

If you need to remove data from the entire context :

wdContext.getContext.reset(true);

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

Nibu,

What you are talking about is wdContext.invalidate() -- it removes all data (and only data).

wdContext.reset(true) removes all data and dynamically modified structures (nodes, attributes)

VS

Former Member
0 Kudos

Yes Valery. I am sorry I forgot to mention the removing of dynamic structures in my reply.