cancel
Showing results for 
Search instead for 
Did you mean: 

Get parameter value from portal event

Former Member
0 Kudos

Hi,

I created two iview:one raise the portal event in javascript and another one is Webdynpro iview for catching portal event. The problem is the event fired and catched perfectly but can't get the parameter data which come with the event.

Dose anybody have same issue.

thanks.

yi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Yi,

please provide some more details, e.g. post the coding you use to get the parameter from the portal event and how you send the event.

Thx

Daniel

Former Member
0 Kudos

Hi,

Check following:

iView a (url iView):

<script>

window.top.EPCM.raiseEvent( "urn:com.bcone.pullmode.location", "type", "value1");

</script>

in iVeiw b (web Dynpro iView)

in doInit() method:

WDPortalEventing.subscribe("urn:com.bcone.pullmode.location", "type", wdThis.wdGetReactEventOhioFactAction());

in method onActionReactEventOhioFact( com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent,java.lang.String value){

//set up the the context value...

System.out.println(value);

}

in runtime the iView b catched the event sucessfully. but without printing out the value "value1"

I put antother javascript code in iView a to test the event

<script>

window.top.EPCM.subcribeEvent( "urn:com.bcone.pullmode.location", "ohioFact", test);

function test(id){

alert(id.dataObjct);

}

</script>

it works fine if both raise and catch in client side.

thxs.

yi

Former Member
0 Kudos

Hi again,

pls rename the parameter in the signature of onActionReactEventOhioFact to <b>dataObject</b> and give it another try.

HTH

Daniel

Former Member
0 Kudos

Hi Daniel,

It's work! Appreciate for your help.

I am just wonder why should the parameter names be specified as "dataObject"?

Anyway it is work

thanks'

yi

Answers (0)