on 08-30-2012 12:20 AM
Hi gurus
I have the following problem.
I have 2 context nodes (context node1 and context node2) in views different. the context node1 is bound to the component controller.
I need get a data from context node1 in the getter_method of an attribute from context node2.
I know how to get a reference to the component controller,you can do it as follows.
lr_controller TYPE REF TO CL_BUD_BSPWDCOMPONEN_IMPL "Implementation class of the component controller
lr_controller ?= me->comp_controller.
but the Access to protected attribute "COMP_CONTROLLER" is not possible.
Can you help me telling me how do I read the data of the context node 1 from the method of the attribute in the context node 2
Regards,
Felipe Grajales
Dear Felipe,
One of the step to access component controller form CNXX class is
Create reference attribute of type component controller in CNXX class
say GR_COCO type ref to (component controller )
Then assign it in DO_PREPARE_OUTPUT.
me->typed_context->(NODE)->GR_COCO ?= me->comp_controller.
Now you can read your Component controller form your getter or setter method.
Thanks and Regards
Rajarama U
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 Felipe,
is the value of context node that you want to get is from a model context node or value context node?
if it is from a model context node, it may be able to be accessed from root and using bol relation
you can go the root by using method get_root(). after that you can get access to its child using method get_related_entity( ).
hopes it helps
cheers
eddhie kurnianto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.