cancel
Showing results for 
Search instead for 
Did you mean: 

using events between EP iView and WD iViews

Former Member
0 Kudos

Hello all,

I'm sending an event from EP iView to WD iView.

it is working fine except i can't pass a parameter between them.

Does anyone know how to pass the parameter?

Thanks, Adi.

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Adi,

see http://help.sap.com/saphelp_nw04/helpdata/en/d3/3857422d095542e10000000a1550b0/frameset.htm for the whole documentation.

Hope it helps

Detlev

Former Member
0 Kudos

Thanks you both,

I know how to pass a parameter when sending an event between two WD iView.

I don't know how to do it between EP & WD iViews.

in the EP code (the sender)

IPortalComponentRequest request = (IPortalComponentRequest)this.getRequest();

IEpcfToolbox myServ = (IEpcfToolbox)PortalRuntime.getRuntimeResources().getService(IEpcfToolbox.KEY);

IClientEventSender mySender = myServ.getClientEventSender(request, XURN, XEVENT);

mySender.setParameter("parameter1", parameter1_value);

mySender.setParameter("parameter2", parameter2_value);

mySender.setParameter("parameter3", parameter3_value);

now, in WD I know how to catch the event but not how to access those parameters.

Thanks, Adi.

Former Member
0 Kudos

Hi ,

When WD iview and PDK based iView are in the same page.. and if you are raising a event from portal iview like

EPCM.raiseEvent( nameSpace, eventName, dataObject,[

sourceId])

WD can subscribe to this event (WD<b>PortalEventing</b>).. with the same namespace and event name.. it will then recieve the values from the portal iview.

WDPortalEventing can be used to pass parameters between 2 WD iviews or from WDiview to portal iview or vice versa.. !

Guess.. it s detailed now..

Regards

Bharathwaj

Message was edited by: Bharathwaj R

detlev_beutner
Active Contributor
0 Kudos

Hi Adi, hi Bharathwaj,

> Guess.. it s detailed now..

I guess it's not

Adi's problem is that he does not put the JS explicitely on his page but via the EPCFToolbox. I have never done this and so I'm unsure how this IClientEventSender works with the possibility to set ("register") different parameters.

Anyhow, Adi, you can check the JS source generated by this to get an idea how this toolbox translates it into "normal" Javascript calls. It shouldn't be different in it's structure from what you know from the JS API presented by Bharathwaj.

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

Is this documented ? I have never used it.. so i cant also help !

But maybe.. he can try "parameter1" instead of

"dataObject" and see if he recieves it.. After all.. whatever the code or API is .. it basically a EPCF event.. !

Hi Adi,

If you are lucky.. replacing the "dataObject" with the parameter name "parameter1" will work out ! Otherwise .. am extremely sorry for misguiding !

Regards

Bharathwaj

detlev_beutner
Active Contributor
0 Kudos

Hi,

> Is this documented

More or less, see http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/epcf_toolbox/com/sapportals/portal/prt/...

> he can try "parameter1" instead of "dataObject"

> ...

> it basically a EPCF event

That's what I wanted to say, also this script generator cannot generate other JS calls than the JS-API provides. That's why I advise to check the generated code, to get an idea how these "registered parameters" work (if they do).

Hope it helps

Detlev

PS: If it doesn't help, just let the toolbox go and create the JS by yourself. If you really want more than one parameter, encapsualte them into one string like "myfirsparam=123;mysecondparam=456".

Former Member
0 Kudos

Hi Detlev,

Thanks a lot for you time,

you wrote:

PS: If it doesn't help, just let the toolbox go and create the JS by yourself.

can you direct me to an example on how to create the JS?

I know I should write:

EPCM.raiseEvent(namespace,eventname,myParam,null);

but (since I know nothing about DynPage or JS) I have no idea

how to add JS to my java code.

any example?

thanks again, Adi

detlev_beutner
Active Contributor
0 Kudos

Hi Adi,

could you provide some code fragment where you try to put the EPCF code into your output now? Then it would be easier to guide you, depending on your actual situation.

Best regards

Detlev

PS: Maybe this helps already:

- EPCF Eventing: http://help.sap.com/saphelp_nw04/helpdata/en/82/04b340be3dff5fe10000000a155106/frameset.htm

- HTMLFragment component to put raw HTML data (or - JS) into the output per API: http://devnetmedia.sap.com/html/submitted_docs/htmlb_apidocs/com/sapportals/htmlb/HTMLFragment.html

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Adi,

WDPortalEventing.subscribe (“urn:com.sap.tc.webdynpro.test.portal”,
    “TestEvent”,    wdThis.wdGetTestEventAction());

IIf you want to receive the portal event’s data you have to define the following parameters for your Web Dynpro action:

Extract from WD Help :

+· dataObject

The dataObject parameter contains the portal event parameter.+

In the action 's handler(TestEvent), create a parameter of name "

dataObject

" of type string.

The passed value will be available in this parameter.

Regards

Bharathwaj