Skip to Content
author's profile photo
Former Member

Top level navigation events?

Hi there!

I have a task consisting of this functionality:

1: Create an iView that listens to the top level navigational events

2: Perform actions (client- and/or server-side) based on what top level navigation entry (menu item) that has been pressed.

I know that I should probably be using EPCM/EPCF, but I can't find any examples of how to listen to events coming from the top level navigation. I can only find examples of how to create 2 iViews (ie. a Sender and a Reciever), and how to send events between these.

Any input anyone?

Thanks in advance,

/Henrik

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Aug 09, 2004 at 04:26 PM

    Hi Henrik,

    you could listen to the navigation event (just as the TLN does to navigate to the next page).

    Here is how it works (JS code):<pre>function myNavEventHandler(eventObj) {

    var navigationTarget="";

    if (typeof (eventObj.dataObject)=="string")

    navigationTarget = eventObj.dataObject;

    else

    navigationTarget = eventObj.dataObject.target;

    <i>// add code handling <b>navigationTarget</b></i>

    }

    EPCM.subscribeEvent("urn:com.sapportals:navigation", "Navigate", myNavEventHandler);

    </pre>Put this code into an component/iView, then place it into the framework page.

    That should be it...

    Regards

    Sven

    Add comment
    10|10000 characters needed characters exceeded