cancel
Showing results for 
Search instead for 
Did you mean: 

Invalidate on output node

Former Member
0 Kudos

Hi guys,

I try to delete all data from my table using the method invalidate on the output node.

Nothing happens. If I do the same for the root node then all data get deleted as expected.

My question: why does output node stay the same after applying invalide()?

What is the source code for invalidate()?

What does 'validate()' do?

By the way, to clean my table I just used 'removeElement()' on the root node.

and then initialized my Bapi object

thank you for your help, as always.

Regards

yuval

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Yuval,

Invalidate works in two different ways:

1) In case of Model Node: It will reinitialize it to the initial data of the modeled node. It will not delete the data instead it will take it back to the initial state in whichmodel was execuated and it has some values.

2) In case of Value Node. It will again reinitialize the data. However there was no data in the value node initially therefore it behaves as the delete functionality for the value node.

Have a llok to the Java Doc as well:


/**
   * With this method the node will be invalidated. It clears its element list
   * and calls the supply function again when asked for an element. A mapped
   * node passes this request to its origin and thus invalidates this one.
   * <p>
   * <b>Warning:</b> This method is not allowed within a supply function.
   * 
   * @throws WDRuntimeException when called from within a supply function.
   */

You can directly use node.invalidate() to remove the elements of the table if the node binded to the table is the value node. Reason is explained above.

I hope this cleas the issue. If you have any further issues kindly revert back.

Thanks nad Regards,

Pravesh

Answers (2)

Answers (2)

ravindra_bollapalli2
Active Contributor
0 Kudos

hi ,

in addtion to the above posts

bvr

Former Member
0 Kudos

Hi guys

Thank you very much for your assitance.

Javadoc is very helpful.

Your answers helped me alot!!

Kep the good work!!

Regards

yuval

former_member185086
Active Contributor
0 Kudos

Hi

wdContext.nodeOrderNumber().invalidate();

don't use removeEle . invalidate only sufficient for clean the data form a node .

Check that whether u did it for right node or not.

Best Regards

Satish Kumar

Former Member
0 Kudos

Satish

I now understand that invalidating a model node causes it to refresh. And that's what happened to me.

Regards

Yuval