Showing results for 
Search instead for 
Did you mean: 

BSP Development and Client-Eventing

Former Member
0 Kudos

I am working on a java stack portal, <b>EP 6.0 SP11</b>. (It does not have the ABAP stack.)

I want to develop my portal content using BSP's. I have a <b>BW</b> installation which is version <b>3.1</b>, running on <b>WebAS 6.20</b>, and an <b>R/3</b> installation version <b>4.7</b>, running on <b>WebAS 6.20</b>.

I can develop BSP's in either of these systems. Currently, I am writing them in the BW system, and displaying them in the portal, however I cannot find an example of how to <b>enable client-side eventing in a BSP running in BW on WebAS 6.20, so my BSP can talk to other iViews on a page</b>. Can someone please explain how I can accomplish this?

Thank you,


p.s. -- I have read many webforum postings on client-eventing and none of them have directly answered the question I have posed, so please provide more explanation than simply a link to another forum posting, if at all possible. Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

Developer Advocate
Developer Advocate
0 Kudos

Portal Client Eventing is possible in BSP. The following is small except from the upcomming Advanced BSP programming book from SAP-Press:

Portal Eventing

The first element is the <bsp:portalEvent>. This element allows your application to subscribe to a portal event via the Enterprise Portal Client Framework, or EPCF.


These portal events can then be trapped and responded to by BSP server-side event handlers. The HTMLB event manager will return details about the Portal event. The key here is to look for any event name called PortalEvent.

DATA: event TYPE REF TO if_htmlb_data.
event = cl_htmlb_manager=>get_event_ex(
runtime->server->request ).
IF event IS BOUND.
IF event->event_name EQ 'portalEvent'.
event_dataobject = event->event_server_name.
event_sourceid = event->event_defined.
SPLIT event->event_id AT ':'
INTO event_namespace event_name.

SAP does not supply a BSP extension element for raising a portal event since this would not make sense. All you really need is the JavaScript function that exposes

this functionality from the portal. All the necessary JavaScript functions are rendered out by the method CL_HTTP_EXT_BSP_HTMLB->EVNETS_JS and included

in your application automatically.


This example code demonstrates the possibility of raising a portal event from BSP through the press of a <htmlb:button>. It also shows how to pass data from a

<htmlb:inputField> into the event.

<htmlb:inputField id = "bookTitle"
value = "BSP for Fun and Profit" />
<htmlb:button id = "fireBuyBook"
text = "Buy Book"
onClientClick = "portalFireEvent('myBooksEve
nts','fireBuy',document.getElementById('bookTitle').value);" />