Portal Eventing between WDP Java iView & non-WDP iView

Dear Experts,
I have 1 Web DynPro Java iView and 1 non-Web DynPro (using JSPDynPage and JSP) iView, both attached to a page. When Web DynPro Java iView fire a portal raise event, the portal iView did not execute the javascript function tied to the event subscribed.
Here is the code snippet which reside in the Web DynPro Java iView that is used to fire the event
String param = "test";
WPortalEventing.fire("urn:com.company.Test1", "TestEvent", param);
This the code snippet that is in the jsp page
function notifyTest(param){ 
      // code to print param value is here
EPCM.subscribeEvent("urn:com.company.Test1", "TestEvent", notifyTest);
Note:
1. When Web DynPro Java iView fire the portal event the entire page is refreshed, including the non-WDP iView.
2. When EPCM is replaced with window.top.EPCM, the page is refreshed, it is totally hanged with progress bar.
Can anyone help to solve this problem?
Edited by: CloudSOmnislash on Apr 8, 2009 6:06 PM

Kumar, Rui,
I have all my code inside a web dynpro component. All that I have in dynpro to work with (or that's what I know so far) is a WDPortalEventing object that I can use to access the fire, subscribeEvent and unsubscribeEvent methods. I still haven't found a way to get to the actual EPCM object that the Portal runtime gives you through javascript. And even if I get there, how am I supposed to write javascript in my dynpro code and later pass the value stored in the client data bag to the web dynpro context ?
Simon,
I had tried a small app yesterday and it didn't work when the iViews were not assigned to the same page. I will see if I can change my code anymore and get it working. I will make fresh posts to this thread as and when I find anything that works. In the mean time, if you have webdynpro iViews that talk to each other across pages, do let me know how you are doing it!
Thanks for your replies...
- Navneet.

Similar Messages

  • Portal eventing between WD java and BSP popup

    Hi guys,
    I have a WebDynpro application that opens a BSP popup like that :
    WDPortalNavigation.navigateAbsolute(
              wdContext.currentURLElement().getEvaluationURL(),
              WDPortalNavigationMode.SHOW_EXTERNAL,
              "directories=no location=no menubar=no resizable=yes status=no toolbar=no",
              "evaluationdeformation",
              WDPortalNavigationHistoryMode.NO_DUPLICATIONS,
              urlParam.toString()
    When the popup is closed, I want to update the content of my webdynrpo application. I tried using portal eventing but it didn''t worked because the popup doesn't seem to know its opener....
    Is anybody have an idea ?
    Thanks in advance.
    Julien.

    Hi Julien,
    have you made sure that your BSP application is using EPCF? There is a flag you need to set to X in your BSP app for this to take effect. Also, you can not add javascript to a WD app, so calling the window.opener will not make any difference. However, you can subscribe to an event raised by another application in your WD app. It is possible to raise events between windows, one being a bsp and the other a WD or portal application. Check the following threads.
    [Portal Eventing: EPCMPROXY calls between two browser windows;
    [Client side eventing between MSS teamviewer and BSP application;
    Cheers,
    Dion

  • Portal Eventing in WebDynpro Java Pros and Cons

    Does anyone have a link to an article that discusses th epros and cons of using portal eventing between dynpro development components between iViews rather than using one larger web dynpro application.  I am clear that reuse can be an issue if you don't make each view t's own development component but I also find portal eventing to be very lacking.  What do others think about on this issue and is that an SAP recommendation?
    Shawn

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a3c57e19-0d01-0010-ad8b-9edde6d1fae7
    Please read the restriction section.
    I will make much more sense if we need a high degree of data interchange between WDP components, to use context mapping and thus internal WDP calls rather than portal eventing.
    hth

  • Difference between using Java and Non-Java in Webi.

    Hi ,
    I have one more question requesting for an answer.
    Would like to know what is the Difference between using Java and Non-Java in Webi.
    Thank You in advance.
    Appana Ganesh.

    Hi,
    check the Information in following post, the differences are discussed there:
    http://scn.sap.com/thread/3295306
    best regards,
    Victor

  • Portal Eventing between Web DynPro Java iView and non-Web DynPro iView

    Dear Experts,
    I have 1 Web DynPro Java iView and 1 non-Web DynPro (using JSPDynPage and JSP) iView, both attached to a page. When Web DynPro Java iView fire a portal raise event, the portal iView did not execute the javascript function tied to the event subscribed.
    Here is the code snippet which reside in the Web DynPro Java iView that is used to fire the event
    String param = "test";
    WPortalEventing.fire("urn:com.company.Test1", "TestEvent", param);
    This the code snippet that is in the jsp page
    function notifyTest(param)
         // Code to print param value here
    EPCM.subscribeEvent("urn:com.company.Test1", "TestEvent", notifyTest);
    Note:
    1. When Web DynPro Java iView fire the portal event the entire page is refreshed, including the non-WDP iView.
    2. When EPCM is replaced with window.top.EPCM, the page is refreshed, it is totally hanged with progress bar.
    Can anyone help to solve this problem?

    hi
    Please write the below code snippet in ur jsp for notifyTestjavascriptfunction
    function notifyTest( eventObj ) {
         eventParameter=eventObj.dataObject;
         // code to print the parameter "eventParameter"
    Thanks
    Harsimran

  • Portal eventing between Java WD iview to ABAP WD iview?

    HI Experts ,
    I have requirement on which,
    The manager can select an employee from the EE Search iView (Object and Data Provider). All other iViews react on the selection and display data of the selected employee. Technically the personnel number is transferred from the search iView to the other iViews on the portal page, also to the related activity iView. This mechanism is called Eventing. The applications, started via the related activity iView, are launched with the personnel number as parameter. With other words the application, e.g. Manage Objects on Loan, can be directly started for the employee selected from the EE Search iView.
    The Employee Information page is based on WD Java whereas the Objects on Loan application described in this specification is based on WD ABAP...........Due to different technologies used how to do the Pernr number transfer between these iviews?
    If anybody have done this let me know the steps
    Thanks in Advance,
    Dharani

    Hi Dharani,
    You can use portal events to enable iViews running on the same page to communicate with each other. You just have to find out which event is fired by the WD Java iView and then you will have to register and handle the event in your WD ABAP application : http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f6/7d6f4151dc5758e10000000a1550b0/frameset.htm
    You can use HttpFox (firefox plug-in) to find the details of the fired event (name, namespace...) by looking at the eventQueue parameter in the HTTP POST request.
    Regards,
    Pierre
    Edited by: Pierre DOMINIQUE on Jul 9, 2009 11:16 AM

  • Portal eventing between pages

    Hi,
    I read around that portal eventing can be done only on the same page and not between pages, is this correct? if so, how do we make events between pages after all?
    Thanks in advance,
    Aviad

    Hi Aviad,
    Portal eventing takes place between different iviews of the same page only.
    To pass between values between different pages, you can store the required value in a Portal Request object or Session object.
    Also you can refer to this link,
    iView to iView communication with EPCF
    This link  contains the code to establish connection between pages .Finally obtaining paramaters through request.getParamater().
    Hope this helps,
    Regards
    Uma.
    Note: It will be better from next time if you could post portal related queries in the EP forum to get quicker responses and ep related guidances.

  • Portal eventing between bsp and VC

    Hi everybody
    I need to use portal eventing to have a bsp and a VC iview communicate.
    The bsp iview should be displayed within the VC iview as html view, raise a portal event with some sort of parameters inside, and then be dynamically hidden by the main iview.
    I have often read about VC and bsp exchanging signals when belonging to the same page, but will this work even with bsp iview within VC iview? Has anyone ever achieved this?
    thanks
    Vincenzo

    Hello Vincenzo,
    It won't work, since the html view is implemented as an iframe on top of the model. If you want to use portal eventing, you should have the iViews inside a portal page which acts as a container and you also have the entire portal framework working for you.
    Regards,
    Natty

  • Portal Eventing: communication betn BSP - WD iView

    Hi All,
    i am doing portal eventing between WD Abap iView and BSP iView with the help of blog <a href="/people/thomas.jung3/blog/2005/12/15/portal-eventing-a-solution-for-global-peace-and-harmony:///people/thomas.jung3/blog/2005/12/15/portal-eventing-a-solution-for-global-peace-and-harmony.
    i have created page which has both iViews.
    but i am not able to trigger the event from BSP to WD.
    please suggest me some direction regarding this.
    Regards,
    Chandra

    Hi,
    the domain is the first part in your URL, for example www.sdn.sap.com.
    In your case it will probably the hostname of your computer.
    The reason for this is security. The portal eventing is build in Javascript and in Javascript it is not allowed to access other frames that are not in the same domain.
    Best regards
    Renald

  • Problem when handling Portal events

    Hi all,
    I am trying to handle portal events between two Iviews on a same page.For this I am using all the necessary parts from coding prospectives(eg. Event fire, Subscribe event and action handler method).
    But I am not able to handle portal events.I found some properties on Iview and page level as:
    1) Web Dynpro Client on Iview level - Default auto (Some threads suggest that events only works on HTML pages).
    I change it to plain HTML, but having doubt that is this value passed to this property.
    2) ID Prefix - Default blank (I-View level)
    I assign com.sap to it and also assign application name to ID.
    Is these will affect something on Portal handling.
    I also watch some e-learning sessions, I do similer to those sessions but at my end I still facing problem.
    Please suggest what I will do more to handle Portal events.
    Thanks
    Sanket sethi

    I am using this code to  fire and catch Portal events.Please look at the code and suggest where I am lacking.
    Fire:
    data node                               type ref to if_wd_context_node.
    data portal_event_namespace  type string value 'urn:com.sap.webdynpro.testApplications.testEvent'.
    data portal_event_name          type string value 'FMP_EVENT'.
    data portal_event_parameter   type string.
      data lr_componentcontroller type ref to ig_componentcontroller .
      data l_api_componentcontroller type ref to if_wd_component.
      data lr_port_manager type ref to if_wd_portal_integration.
      lr_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      l_api_componentcontroller = lr_componentcontroller->wd_get_api( ).
      lr_port_manager = l_api_componentcontroller->get_portal_manager( ).
      lr_port_manager->fire(
        exporting
          portal_event_namespace = portal_event_namespace
          portal_event_name      = portal_event_name
          portal_event_parameter = portal_event_parameter ).
    Catch: (Register and receive parameter)
      data node                                  type ref to if_wd_context_node.
      data subscribe_hello                   type wdy_boolean.
      data  view                                  type ref to if_wd_view_controller.
      data  portal_event_namespace    type string value 'urn:com.sap.bc.webdynpro.<namerspace>.<Name>.
      data  portal_event_name             type string value 'FMPEVENT'.
    here is the name of the action where the portal event will be received!
    you have to create this action in the application!!
    data  portal_event_action_name  type string value 'RECEIVE_PORTAL_EVENT'.
      data lr_componentcontroller type ref to ig_componentcontroller .
      data l_api_componentcontroller type ref to if_wd_component.
      data lr_port_manager type ref to if_wd_portal_integration.
    DATA lo_api_component  TYPE REF TO if_wd_component.
    DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.
    lo_api_component = wd_comp_controller->wd_get_api( ).
    lo_portal_manager = lo_api_component->get_portal_manager( ).
    DATA lo_api_controller  TYPE REF TO if_wd_view_controller.
    lo_api_controller ?= wd_this->wd_get_api( ).
    CALL METHOD lo_portal_manager->unsubscribe_event
      EXPORTING
        portal_event_namespace = portal_event_namespace
        portal_event_name      = portal_event_name
        view                   = lo_api_controller
      lr_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      l_api_componentcontroller = lr_componentcontroller->wd_get_api( ).
      lr_port_manager = l_api_componentcontroller->get_portal_manager( ).
      view ?= wd_this->wd_get_api( ).
       call method lr_port_manager->subscribe_event
          exporting
            portal_event_namespace = portal_event_namespace
            portal_event_name      = portal_event_name
            view                   = view
            action                 = portal_event_action_name.
      data node                              type ref to if_wd_context_node.
      data portal_event_namespace type string.
      data portal_event_name          type string.
      data portal_event_parameter   type string.
      portal_event_namespace = wdevent->get_string('PORTAL_EVENT_NAMESPACE').
      portal_event_name          = wdevent->get_string('PORTAL_EVENT_NAME').
      portal_event_parameter   = wdevent->get_string('PORTAL_EVENT_PARAMETER').
      node = wd_context->get_child_node( name = 'PORTAL_EVENT_DATA' ).
      node->set_attribute( exporting name = 'PORTAL_EVENT_NAME' value = portal_event_name ).
      node->set_attribute( exporting name = 'PORTAL_EVENT_PARAMETER' value =                         portal_event_parameter ).

  • Client side event between Java iView and BSP application

    Hi,
    I am developing a BSP iView which listen to event raised by standard SAP HR TeamViewer iView.  The TeamViewer iView raise a event when user click on the employee list. 
    EPCM.raiseEvent { "urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectChanged", concatenatedKey);
    My BSP is subscribing to the event and perform the myreceiveEvent function.
    EPCM.subscribeEvent
    ( "urn:com.sap.pct.hcm.orgmanagement:CurrentObject", "objectChanged", myreceiveEvent );
    However, my BSP returns an error message saying that EPCM is undefined.  I know that I have to included the java script file.  I checked with my basis team guy and they said there is not any js file in ICF.  Can someone let me know which file I need to include in my BSP code and where is the file locate?
    Thanks,
    Eric

    Hi Eric,
    > the ICF where the BSP is stored
    > is in the Oracle database
    Eric... the place where the JS fragment - within the BSP - appears, is retrieved by some http request. The script=epcfproxy.js forces the browser to send a http request just to the same relative location the original page came from. Doesn't matter if something is within a database...
    > Do you know how to locate the
    > epcfproxy.js file in the WAS?
    I think:
    > and the epcfproxy.js file is in the zip file
    > that you suggested
    you have found it?! Put it to any place on the BSP server you can access, if you can't set it with relative url, use "/some/.../dir/epcfproxy.js" as location.
    > If I am only EPCM but not EPCMPROXY,
    > do I need to include the epcfproxy.js in my code?
    Have a look at epcfproxy.js. It's no magic at all, you have to call top or parent (just look) and do some minor things. For sure, you can live without the proxy file, you have just to put the neede scripts explicitely on your page, that's not that fine, but it works.
    Hope it helps
    Detlev

  • Java Portal Event not received correctly by ABAP Webdynpro

    We have a page that contains 2 iviews. 
    iView 1 contains the MSS Employee Search that raises portal event:
    Namespace: "urn:com.sap.mss.employeesearch"
    Name: "selection_changed"
    The second iview contains an ABAP Webdynpro program that subscribes to the Portal event. 
    The issue is that the event in the ABAP webdynpro is not being triggered.  It does get triggered if we first fire the event from the Java program, unsubscribe the event in the ABAP program them subscribe to the event in the ABAP program.  The event gets triggered at this time and the parameter can be retrieved. 
    If the event is fired a second time, nothing happens in the ABAP program. 
    The abap program works fine when another abap program triggers the same portal event.
    Also, the portal event is being picked up correctly by other SAP delivered JAVA programs.  I just cannot get a custom ABAP Webdynpro program to work...
    Any ideas, comments?
    Glenn

    Hi Glenn,
    Are you using https? Is your j2ee stack and abap stack in the same domain? In the past I have found that https can cause issues in the event communication between different applications.
    Cheers,
    Dion

  • Eventing between Web Dynpro iView and regular DynPage iView

    I have seen, done eventing between two dynpage iviews and two webdynpro iviewsHowever, and gone through "How to Use the Portal Eventing for Web Dynpro iViews". However, I have been trying to have a webdynpro iview talk to a dynpage iview but they just won't communicate. Is this even possible?
    Ok basically I have a portal page in a popup window with no masthead and top level navigation. The page has two iviews -  the top one being an iView that points to a webdynpro application on Server A, and the bottom one being a dynpage iview on the Portal Server B.
    In the webdynpro iview, the code for when a button is clicked is
    public onSomeAction(Event event) {
        WDPortalEventing.fire("urn:myUrn","eventName","value");
    In the dynpage iview, the code i have for it is
    myServ = (IEpcfToolbox) PortalRuntime.getRuntimeResources().getService(IEpcfToolbox.KEY);
    myReceiver = myServ.getClientEventReceiver(request, "urn:myUrn", "eventName");
    form.addRawText(myReceiver.getWrappedScript());
    try {
        if (!myReceiver.isReceived()) {
            form.addComponent(createMainScreen());
        } else {
         form.addComponent(new TextView("event received!"));
    } catch (Exception e) {       
        form.addComponent(createErrorScreen());
    I tried all the things I could think of but the receiving iView just won't get the event fired.
    Can someone confirm that this should work? and correct me where I've done wrong.
    Please help. this is very urgent. your help will be greatly appreciated. thanks in advance
    PS. My environments are EP 6.0 SP2 and WAS 6.40 SP14

    > hi,
    >
    > portal eventing  works properly if all participants
    > are in the same domain. Otherwise portal eventing
    > g does not work. If the SAP J2EE
    > Engine on which the Web Dynpro application is
    > deployed is in another domain, you have to  map the
    > IP address of the SAP J2EE Engine to the domain name
    > of the
    > SAP J2EE Engine on which the SAP Enterprise Portal is
    > running, by editing the configuration file hosts.
    >
    > regards,
    >
    > Ganesh.N
    I am no direct access to the boxes so I can't try your suggestion. It really makes sense that eventing won't work if the iViews are on different domains. I know they are in the same domain but different subdomains.
    Anyway, good news I got eventing to work with the mentioned set. I found that that the SAP Java EPCFToolbox API had a bug that kept throwing javascript errors when I tried to have the web dynpro iview fire an event and the SAP one subcribed to it.
    I got around it but using the EPCF Javascript API instead.
    Code:
    response.write("<script>");
    response.write("EPCM.subscribeEvent('urn:dla.telework', 'createPdf', doSomething);");
    response.write("function doSomething() {");
    response.write("window.location = self.location + '&eventReceived=true';");
    response.write("}");
    response.write("</script>");
    So basically just output raw text through the response object and it just works.
    On a similar topic, since eventing can only pass string parameters back and forth, I'm still looking for a way to pass other more complex Java objects between web dynpro and sap iviews. From what I haven't they don't share the same session object (which I thought they did). So basically I can't just stick stuff in the session and pull it down on the other end. I'm clueless right now. If anybody has some tips, plesae share. Thanks

  • WebDynpro iViews and Portal Eventing

    Hi All,
    I am planning to prepare a proof of concept with following requirements.Can you please give me hints and resources to prepare this in 2 days?
    1)Interaction between iViews using EP eventing.
    2)Exploring how and what kind of data can be passed from one iView to the another (String , Java Objects etc)
    3)Keeping track of various events of EP especially finding out if we can track when the user session is invalidated by the Portal so that we can free objects from memory.
    4)The sample code should have 2 to 3 iViews interacting with each other and passing data.With detailed description of each steps from coding till deployment to the EP.
    Thanks & Regards,

    Hi Noaman,
    You can use EPCM for eventing between iviews in portal. Also we can use the same for communication between Webdynpro and EP applications.
    You can pass parameters using client data bag. The code for sender ....
    var an='Hello';
    EPCM.storeClientData("urn:namesapce","key",an);
    EPCM.raiseEvent("urn:namesapce","eventname");
    Code at the reciver....
    function fn_selection()
    var info=EPCM.loadClientData("urn:namesapce","key");
    document.myform.name.value=info;
    EPCM.subscribeEvent("urn:namesapce","eventname",fn_selection);
    This is the javascript code for triggering and subscribing  events in between iviews.
    Hope this Helps
    gEorgE

  • Eventing between multiple IViews

    I have multiple Dynpage IViews on one page. I raise and receive events between the IViews. I can alert the databag or eventObject values. The problem is when I try and write to the IView that has subxcribed to the event.
    ending IView:
    /******  store initial client data   ******/
         EPCM.storeClientData( 'urn:myOwnNameSpace', 'myData', '15' );
         EPCM.storeClientData( 'urn:myOwnNameSpace', 'myData2', '10' )
    /******* set the user name based off of the selected index for Request For *******/
    function setRequest(){  
         var funcName = htmlb_formid+"_getHtmlbElementId";
         func = window[funcName];
         var ddl = eval(func("Request"));  
         var selectedIndex = ddl.getIndex();
         var name = ddl.getValue(selectedIndex);
         EPCM.raiseEvent( 'urn:myOwnNameSpace', 'myRequestFor',  name );
    Receiving IView:
    [code]function myRequestHandler( eventObject ) {
        var passedData = eventObject.dataObject;  
        var temp=EPCM.loadClientData('urn:myOwnNameSpace', 'myData');
        var funcName = htmlb_formid+"_getHtmlbElementId";
         func = window[funcName];
         var myTime = eval(func("myTime"));  
         myTime.setValue(passedData);
    EPCM.subscribeEvent( 'urn:myOwnNameSpace', 'myRequestFor', myRequestHandler);code]
    The alert has the data passed but the values are not written back to the JAVA htmlb objects.
    I did the same thing using JSP DYnpages and it works. I would prefer nto to use the JSP page. Do I have an option

    the problem is not missing the document element value. I have it. I can alert it to the browser. The problem is forcing the value back to the JAVA HTMLB form element within the class.
    The problem is closed. I have gone the JSP route which is working.
    Message was edited by: Tom Mosseau

Maybe you are looking for