on 06-23-2006 7:01 AM
Hi,guys:
My Component Controller has the structure as following :
<b>Contex</b>t
-
<b>_nodeInput</b> (Executable RFC)
-
nodeA
-
nodeB
-
...
-
<b>_nodeOutput</b>(the result)
-
nodeA
-
nodeB
-
...
-
<b>nodeFlightList</b>
-
Atrribute1
-
Atrribute2
-
Atrribute3
........
My View Controller has the same structure with the aboved .
I have a table UI with datasource of <b>nodeFlightList</b>
After I call the Bapi ,i excecute:
wdContext.nodeBapi_Flight_Getlist_Input().nodeOutput().invalidate(),That's work fine .
However ,i don't understand why i must call the invalidate() from <b>nodeOutput</b> instead of <b>nodeInput</b>? ,even call invalidate() from <b>nodeFlightList</b> because the table UI just map nodeFlightList node ( the data of what i want to display all lie in this node(<b>nodeFlightList</b>))?
I have tried this two :
wdContext.<b>nodeBapi_Flight_Getlist_Input.invalidate()</b>
wdContext.nodeBapi_Flight_Getlist_Input().nodeOutput().<b>nodeFlightList().invalidate()</b>
No data was displayed in the table UI, they don't work .
Hello Guixin,
Regardless of how the content of a node collection was determined, a node can be invalidated at any time which means that the value is redetermined the next time it is accessed.
Invalidation like this (i.e the root RFC node)
wdContext.nodeBapi_Flight_Getlist_Input.invalidate()
will clear off everything from within the node.
For a better understanding, refer <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/66/8b3c413b456e24e10000000a155106/content.htm">Invalidating context node</a>
Warm regards,
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Guixin,
First and foremost invalidate() destroys context of node. But interesting things happen next
In WD you may have nodes with or without automatically supplied context.
First type has 2 variation
-- model / value nodes with supplyFunction defined. When this node is re-validating with either explicit call to validate() or access to node elements, then supply function is invoked to populate node.
-- model nodes with supplyingRelationRole defined. Check your context. Your nodes _Output and _List has this role defined. When this node is re-validating, model object from parent node element is queried for relation. Related items are used to populate node in question.
Second type is your _Input node. It has neither supplying relation (because it has no model "parent") nor supply function. So after destroying context with invalidate() it should be explicitly populated with either bind() or addElement(). No automatic validation here possible.
Valery Silaev
EPAM Systems
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.