cancel
Showing results for 
Search instead for 
Did you mean: 

Removing elements in a model node

Former Member
0 Kudos

Hi gurus,

I have a question about removing elements in a model node. I have this context situation:

root model node

-Output node (0...1)

-Output_Ebeln (0...n)

-field1

-field2

This context is bind to a model and filled using a RFC.

When I call the execute method the Output_Ebeln node is filled. Now I remove di output node whit this:

for(int i=0; i<wdContext.nodeOutput().size(); i++) {

wdContext.nodeOutput().removeElementAt(i);

}

But is this the only method? Is there one less "expensive" and much better?

Thanks a lot.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Ok...I'll use the for iteration to remove single elements from the model node.

Thanks to all

Former Member
0 Kudos

I just try

wdContext.nodeOutput().invalidate();

but nothing. I'm using a OVS custom controller and I try to insert the code above in the applyResult method and also in applyInputValues of the class that implements the IWDOVSContextNotificationListener interface. I want to remove the outupt results so that if you want to research you have all clean (without previous results).

I spent a lot of time and the only method that I found is removing elements with for iteration.

Thanks

Former Member
0 Kudos

I had the same problem that invalidate didnt clear the model nodes, I then initialized a new model and created a new model object and called .bind(mobelObject) another time.

former_member201361
Active Contributor
0 Kudos

Hi,

i am not clear with ur query , can u please elaborate it.

for OVS, check this link...

[https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/valueHelp-ObjectValue+Selector]

Thanks and Regards

Fazal

Former Member
0 Kudos

Hi,

please go through the below thread it may help you,

Regards,

ramesh

former_member201361
Active Contributor
0 Kudos

Hi,

Welcome to SDN

u can use invalidate method to make the node collection null

wdContext.nodeOutput().invalidate();

Thanks and Regards