cancel
Showing results for 
Search instead for 
Did you mean: 

EP6 Client-side Eventing basic question

Former Member
0 Kudos

hello,

i have a really basic question on client framework, eventing in particular. i am on ep6 with sp1. i've read quite a bit of documentations on the topic but didn't find a clear statement for the following.

is client-side eventing meant only for iviews on the SAME portal page?

for example, i have two iviews: A raises an event that is subscribed to by B. if i place both iview A and B on the same portal page, the event handler defined in B appears to be invoked. BUT, if i place iview B on a different portal page, when A raises the event, i don't see the event handler in B being called at all. (i didn't to the page where B is on.)

is this the expected behavior? or perhaps my situation is special since it involves the logoff event (see below). what's the alternative, if any, for cross-page communication between iviews?

PS....

i am asking the question under the following context. i have successfully built java iviews to integrate with a web-based application (external to portal and sap j2ee engine). this is done through the application integrator service but with my own layer etc. the last task is to implement session termination for my web app whenever the portal user logs off.

from viewing source of any portal page, i see that the 'Logoff' link raises a client-side event:

EPCM.raiseEvent("urn:com.sapportals.portal:user", "logoff", "")

so i thought that i would subscribe to this event in my java iview. my event handler would invoke the logoff url for my web app. it works fine when i click the portal logoff link while displaying my iview. but if i click the logoff link from any other portal page (that doesn't show my iview), the event handler is NOT invoked.

thanks for any thoughts.

wentao

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes, as far as I know it is only for iviews on the same page. This is because it uses javascript which is strictly a client side scripting.

As I see it you have at least three options to solve the problem

1) (don't really know if this works) Store value in the client data bag instead of issuing a new event. The iview on the other page can then (maybe?) read them when they are loaded (not sure on the persistance of the client data bag)

2) Make the publisher a java iview and set it to store a value in the IPortalComponentSession. When the doInitialization is called in your iview on the other page, you read this value

3)Make a new "invisible" java iview which listens for clientside event(which your normal iview sends as usual). When it receives an event it reloads and writes the a value to the IPortalComponentSession. When the doInitialization is called in your iview on the other page, you read this value

hope this made any sense