cancel
Showing results for 
Search instead for 
Did you mean: 

Clear complete Modelnode

Former Member
0 Kudos

Hi,

i have a new problem. After execute a RFC my context (mapped to the model) is filled. Now I will (after a button click onaction) refresh the context. But I have no idea how it should work.

I try this,

int nodeSize = wdThis.wdGetContext().nodeLt_Message_Load().size();

for(int index=0; index<nodeSize; index++){

wdContext.nodeOutput().nodeLt_Message_Load().????

}

but I can't find any type of "remove entries".

And I try this-

wdContext.nodeOutput().invalidate();

but it dosn't work.

I hope anybody can help me.

Thanks Stefan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Stefan,

You have to delete the entries like this.

IPrivate<ControllerName>.I<NodeElementName> element;

int nodeSize = wdThis.wdGetContext().nodeLt_Message_Load().size();

for(int index=nodeSize-1; index>=0; index--){

element = wdContext.nodeLt_Message_Load().getLt_Message_LoadElementAt(index);

wdContext.nodeLt_Message_Load().removeElement(element);

}

Please note that we traverse the node backwards.

Regards,

Shubham

Answers (1)

Answers (1)

Former Member
0 Kudos

HI Stefen,

If you want to clear whole model node then writye folowing code.

wdcontext.node<model root node>().invalidate();

It will remove all the data. Now, you have to re-create the element for this model and you have to initialize once again.

Regards,

Bhavik