on 06-18-2011 12:38 PM
Hi everyone,
I am curious to know the differences when the same invalidate() function is called on value node and model node.
When i used invalidate() on value node which is databinded to a table its elements got disappeared. I can see the table becomes empty.
But, when i used a model node which is databinded to the table, the elements doesnt disappear.
Why?
Please help me understand this.
Thanks.
Dear Swaminathan,
The Answer is very simple, Invalidate() function is to flush the old data
So when you are flushing a local node its become blank but when you are flushing the model node it is to flush the old data and the new data can take its place .
Regards
Piyas Kumar Das
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When i first execute the model the response comes in say "Persons" output model node.
When i invalidate it. its elements doesnt disappear. It sync the data to the latest execution.
But when i invalidate the root model node say Z_SEARCH_PERSONS_INPUT , i can see the elements in the response node gets disappear.
WHy is that?
Please help me undersand this part.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The best way to understand this is to understand the Model class. Incas of model nodes they don't have a storage location. Memory is allocated for the Model object and Model nodes just reference to the data stored in that particular instance.
You map a model object instance to a model node when you do a bind().
When you invalidate the parent node(Input node) you reinitialize the parent class and all the child classes will also get reinitialize, and you will have to call the execute method to fetch the value for the output node. The invalidate on the output node just rebinds the current model object state to the model node and hence you see the updated value.
Hope it helps.
Thanks
Prashant
invalidate() brings a node to it's initial state. For a Value node the state is empty node structure. For a model node it's the state of the model object. So in case of value node the node will become empty, whereas in case of model node it will reflect the current content of model object.
Hope it clarifies the issue.
Thanks
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
regarding the call for model node, it will try to sync data from mode object
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.