on 03-20-2012 5:08 PM
hi Experts,
i have a node in component controller. i want to access that in some method in view controller. please note that i do not want to do mapping. they are separate nodes. i want to read/set the node of component controller from view controller methods. is this possible? if yes can somebody give the sample code?
thanks
Hi,
It is possible to read/set node at component controller level from view level.
1.Get component controller API
lo_component = wd_comp_controller->wd_get_api( ). (lo_component type ref if_wd_component)
2.Get controller context node :
lo_controller ?= lo_component. (lo_controller type ref to if_wd_controller)
lo_controller->get_context.
4.Get root node of component controller
5.Get child node
And then you can use get_static_attributes_table or set to bind data.
Thanks
Bhanu Malik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
you can create a method under COMPONENT CONTROLLER -> Method tab and refer it using:
wd_comp_controller-><method name( )>
Write the functionality inside the method created
Regards,
Ajoy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1 Create a method in component controller as read_node with relevant parameters to be exported.
2 In this method, read the node and retrieve the data and you can either pass data to those exporting parameters or create relevant variables under attributes tab of component controller so that you can globally use them and pass data to these attributes eg temp type I.
3 In the view method, you can use the below code
variable = wd_comp_controller->read_node( ). "if exporting parameters declared
or
you can directly use the global variable declared like this
wd_comp_controller->temp.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.