on 12-13-2011 2:13 PM
Hi,
I have two WD components. One component's view is embedding a view from the other. In the main component I set some attributes in the component controller context. From the embedded view I try to call a method belonging to the component controller of the main component. If I want to be able to call this method I have to instantiate the component usage (otherwise I get a short dumb), something like the following code:
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_usage_cockpit( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_ic_co TYPE REF TO ziwci_srm_wdc_ks_co .
lo_ic_co = wd_this->wd_cpifc_usage_cockpit( ).
lo_ic_co->copy_proc( ).
But this code always creates a new component. The problem is that afterwards, when I am in the copy_proc() method, the context is empty!
I want to be able to access the context I set before. How can I achieve this, or what am I doing wrong?
Any help would be much appreciated!
Hi Torsten,
I'm not very sure about your requirements, but it seems you have to call the method in the WDDOINIT of your view.
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.