on 03-18-2009 7:06 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.