on 03-27-2012 5:44 AM
Hi Experts ,
What is wd_context and where to use wd_context?
Thanks and Regards
Abhishek Kumar
Hi,
The WD_CONTEXT attribute is a reference to the root node of the context of the controller.
Regardless of the edited controller, it is always a reference variable of the type
IF_WD_CONTEXT_NODE. You can use WD_CONTEXT and the interface methods to
edit the content of a context node in your controller method.
For Example
The controller context contains the TABLE_NODE node. You can use the INVALIDATE
method to invalidate the values of the node elements.
method INVALIDATE_TABLE_NODE .
data: TABLE_NODE type ref to IF_WD_CONTEXT_NODE.
TABLE_NODE = WD_CONTEXT->GET_CHILD_NODE( 'MY_TABLE_NODE' ).
TABLE_NODE->INVALIDATE( ).
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to all i got the concept
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I would like to add some more points to Harsith's comments.
The WDA framework itself declare a variable called WD_CONTEXT in the attributes. It refers to the root node of the corresponding controller. For eg. WD_CONTEXT in Componenent controller refers to the root node in Component Controller and WD_CONTEXT in View Controller refers to Root Node in View Controller. When you define a node in View, it can be accessible in View Controller methods only. A Constant will be created in Controller Interface whenever you are defining a node.
The root node has a interface which is IF_WD_CONTEXT. It has some public method which will be accessible by the controller methods and the context has a property called Lead_Selection, if you make it as marked, then the element of the node will always be set as lead selected.
Hope this helps !!!
Thanks,
Sudar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.