on 09-24-2010 11:16 AM
Hi ,
I have created a WDA component and written the code to subscribe to the event as below.but the eventing is not working,the control is not going to the event handeler method.
below is the code i have written in the View of my component WDOINIT.
l_api_component = wd_comp_controller->wd_get_api( ).
l_portal_manager = l_api_component->get_portal_manager( ).
DATA l_wd_view TYPE REF TO if_wd_view_controller.
l_wd_view ?= wd_this->wd_get_api( ).
CALL METHOD l_portal_manager->subscribe_event
EXPORTING
portal_event_namespace = 'urn:com.sap.mss.employeesearch'
portal_event_name = 'SELECTION_CHANGED'"'selection_changed'
view = l_wd_view
action = 'SUBSCRIBE_TO_EVENT'.
and the event handeler code is :-
method ONACTIONSUBSCRIBE_TO_EVENT .
DATA: evt_name TYPE string.
DATA lo_nd_gc_event_data TYPE REF TO if_wd_context_node.
DATA lo_el_gc_event_data TYPE REF TO if_wd_context_element.
*DATA ls_gc_event_data TYPE wd_this->element_gc_event_data.
DATA lv_event_string TYPE string.
evt_name = wdevent->get_string( name = 'PORTAL_EVENT_NAME' ).
IF evt_name = 'selection_changed'.
lv_event_string = wdevent->get_string( name = 'PORTAL_EVENT_PARAMETER' ).
get single attribute
*lo_el_gc_event_data->set_attribute(
*EXPORTING
*name = `EVENT_STRING`
*value = 'handled' ).
ENDIF.
endmethod.
I don't know why it is not triggering the handeller method.
Can somebody help me by the steps how to achieve this.
Thanks
Ankur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are the host names of your Web Dynpro ABAP and Portal within the same domain? For example if the URL of your WDA is system.ourcompany.int and the portal is portal.ourcompnay.com, then portal eventing will not work. You can't have cross domain scripting. This is generally one of the more common sources of portal eventing simply not working - if anything after the first dot in the URLs of both the WDA and the Portal don't match then portal eventing isn't going to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Thanks for the help.
My portal URL is http://mrl-sapd1-ep.myproject.com:54200/irj/portal
and the WDA Application URL is http://mrl-sapd1-ec.myproject.com:8002/sap/bc/webdynpro/sap/za_st_date
and i think both are having same domain, but still it is not working will there be any thing else i am missing in the concept.
Regards
Ankur
HI,
Portal integration methods will work only when the applicatios integrated in portal.
Put a external break p oint and check if the event handler method is triggering from portal or not?
Regards,
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anand,
Thanks for the reply
I have Checked the SAP Note 1112733 and from there only i have taken the parameters:
Event namespace: urn:com.sap.mss.employeesearch
Event name: selection_changed
Event parameter:
The information about the selected object are contained in the parameter
string as follows (concatenated):
Plan variant (2 characters)
Object type: (2 characters)
Start date of the object: (8 characters in the format yyyyMMdd)
End date of the object: (8 characters in the format yyyyMMdd)
Object ID: (remainder of the parameter string)
But i think i am missing something.
Can you please check and help if i have missed something in the code.or have to do something in the configuration in the portal as this code is not working it is not going to the breakpoints in the init or the event handeler method when we click on the employee in the employee search iview.
Thanks
Ankur
Edited by: ankur upadhyay on Sep 24, 2010 1:53 PM
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.