on 07-12-2012 10:30 AM
Hi Forum,
A new component/view is called from FPM component using the below code
DATA: lr_elem TYPE REF TO if_wd_context_element.
DATA: ls_hcp_data TYPE wd_this->element_hcp_data.
DATA: lr_event TYPE REF TO cl_fpm_event.
lr_elem = wdevent->get_context_element( name = 'CONTEXT_ELEMENT').
lr_elem->get_static_attributes( IMPORTING static_attributes = ls_hcp_data ).
lr_event = cl_fpm_event=>create_by_id( cl_fpm_event=>gc_event_view_switch ).
IF ls_hcp_data-view_id IS INITIAL.
lr_event->mo_event_data->set_value(
iv_key = cl_fpm_event=>gc_event_param_view_id
iv_value = ls_hcp_data-id ).
lr_event->mo_event_data->delete_value(
iv_key = cl_fpm_event=>gc_event_param_subview_id ).
ELSE.
lr_event->mo_event_data->set_value(
iv_key = cl_fpm_event=>gc_event_param_view_id
iv_value = ls_hcp_data-view_id ).
lr_event->mo_event_data->set_value(
iv_key = cl_fpm_event=>gc_event_param_subview_id
iv_value = ls_hcp_data-id ).
ENDIF.
CALL METHOD wd_comp_controller->mr_fpm->if_fpm~raise_event
EXPORTING
io_event = lr_event.
I want to pass one value to the called WD component may be using URL parameters and get that parameter in the view of called component.
Is that possible?
Thank you,
Anubhav
HI Anubhav,
I see that you are raising an event with certian parameters using fpm. In fact, I don't see it as 'calling a WD component'. All the components that are a part of this fpm instance can react to this event. So, your listener must be programmed accordingly.
Why do you have to use URL parameter?? I do'nt understand your requirement. can you plz explain.
Regards,
Smitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U can just handle the event that you raised in your code above in the WD Component. Once you handle it, you will also have the data that you passed as event data.
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.