Skip to Content
author's profile photo
Former Member

Dynamically deleting Nodes?

Hi,

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

Regards

MK

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Oct 05, 2005 at 07:53 AM

    Hi MK,

    Use

    wdContext.getContext().reset();

    OR

    wdContext.getContext().reset(true);

    Regards,

    Shubham

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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