on 02-22-2007 11:48 AM
Hi All,
I have some doubts using WebDynpro portal eventing for communication between two WebDynpro iViews. Here is the code for my first Webdynpro iView
String name = wdContext.currentRecordsElement().getRecordId();
WDPortalEventing.fire("urn:abc.com/basicdata", "send", name);
and the code for my second iView is
WDPortalEventing.subscribe("urn:abc.com/basicdata","send",wdThis.wdGetReactPortalEventingAction() );
and in the method I have set the value for context attribute.
My question here is I am unable to get the value from the first iView to second iView, both are in the same page. I have given the value in input field and when I press the button in the first iView, the value to be displayed in second iView.
The project name is : LocalDevelopmentbasicdataabc.com
Here my doubt is what is urn or namespace name I have to give for WDPortalEventing.fire("urn:abc.com/basicdata", "send", name);.
Regards
Suresh
Hi,
WDPortalEventing.fire("urn:<b>abc.com/basicdata</b>", "send", name);
WDPortalEventing.fire("urn:<b>abc.com/basicdata</b>", "send", name);
The one which are in bold should match and that package can be anything.It need not mach with your project name. But both the iView should be assigned to the page. If you dod not assign them to a page then eventing will not be performed.
Refer to the following example for more information:
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/5d/08f43cf1da7646a2b210a16321c669/frameset.htm">Code Example for Programming Portal Eventing</a>
Regards,
Jhansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jhansi,
I have done the same. For both iViews I have given the same urn and I have assigned those iViews to the saem page, but the name is not displaying in second iView. Is there any changes to be done from server side for events. I have follwed the same example given by you.
Regards
Suresh
Hi EP Developer,
SAP provides some APIs for storing the data of 1 view in namespace & reusing it in othhr iview.
Use following 'Client Data Bag APIs' to server your purpose.
1. Store data from 1st iview :
<b>EPCM.storeClientData(nameSpace, name, value)</b> - saves data in value under a key.
name - Attribute name of type string.
value - Value to be stored as name.
2. Get the data back in 2nd iview :
<b>EPCM.loadClientData(nameSpace, name)</b> - Gets the data for the attribute 'name' in the nameSpace.
In youe case......
1st view.-
String name = wdContext.currentRecordsElement().getRecordId();
EPCM.storeClientData("urn:abc.com/basicdata", "NameAttrib", name);
< your code for portal eventing >
2nd view :
String name = EPCM.loadClientData("urn:abc.com/basicdata", "NameAttrib");
You have to use <b>Enterprise Portal Client Framework (EPCF)</b> services in your dynpro views.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
The parameter you are passing from the first iView to the second iView should be captured somewhere in the second iView.
Do one thing, in the eventhandler on the second iView create a parameter of String type, name it as "dataObject". Get the value of the dataObject and you will get a string like "name=<whatever>". Here, dataObject will hold the value of the parameter passed.
Hope this helps.
Regards,
Mausam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
URN is independent of Project name. The only thing is what URN you give at event raising time should match with the subscription.
Can you just try printing on the screen when you come to the second view rather than mapping a UI element just to check if the second iView is being called or not?
Regards,
Mausam
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.