Skip to Content
0
Former Member
Mar 12, 2007 at 06:26 AM

Pass value from pdk iView to webdynpro iView

13 Views

Hi All,

I want to pass a value from pdk iView to webdynpro iView. I am unable to get the value from jsp but event is able to subscriibe in wdDoInit method. Here is my jsp code

<hbj:button

id="Send_Button"

text="Send"

onClientClick="sendEvent()"

tooltip="Submit"

width=""

design="EMPHASIZED" >

</hbj:button>

<script>

function sendEvent()

{

EPCM.raiseEvent('urn:com.abc.practice' , 'sendEvent' , 'Success');

alert("Eventdata is "+evtData);

}

And here is webdynpro code

WDPortalEventing.subscribe("urn:com.abc.practice","sendEvent",wdThis.wdGetReactPortalEventingAction() );

in the event method I set the value for context attribute and here is the code

public void onActionReactPortalEventing(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String str )

{

//@@begin onActionReactPortalEventing(ServerEvent)

wdContext.currentContextElement().setName(str);

IWDMessageManager manager = wdComponentAPI.getMessageManager();

manager.reportSuccess("EPCM event testing "+str);

//@@end

}

I am able to receive the mesage from message manager when I click the button in jsp iView but I am not get the value.

Please let me know what else I need to add to the above.

Regards

Suresh