Showing results for 
Search instead for 
Did you mean: 

doubt abt the context that is defined

Former Member
0 Kudos


we do have an option of declaring the nodes in the context of the particular view and also we can define the same in the component controller. my doubt is if we call a node with the meta data usage then we get a declaration like

DATA lo_nd_aenr TYPE REF TO if_wd_context_node.

DATA lo_el_aenr TYPE REF TO if_wd_context_element.

to which context it is pertaining to whether to the context node of the view or to the component controller.

and please say me wht is the advantage of declaring the nodes in the component controller and then dragging them in to the particular view where it is necessary.

and if possible say me the differences between declaring the nodes in the component controller and the view.

thanks and regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ibrahim,

The attribute wd_context, refers to the current context. If you are using it in the component controller, it means the component controller's context. In the view, it means that particular view's context.

Declaring context nodes in the comp controller is used when you want to share your data across views. Say you have a use case where you enter some search query in one view, and on clicking search, the results are displayed in a subsequent view. Then the second view will not have your search parameters by default. They have to be made attributes in the comp controller, and mapped in both views. So the data can be shared.

Otherwise there is no big difference. A comp controller node when mapped to your view just becomes another node in the view context. It will be read as any other node in the view only.

Hope this helps.



Answers (1)

Answers (1)

0 Kudos

The Advantage of declaring the node in component controller is that you can use it share the data between different views and its better to use more then one view for your component it helps in structuring your application