cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between 2 IViews on 2 different Pages

Former Member
0 Kudos
61

Hi All,

I have webdynpros iViews(created within two seperate projects/application) which are embedded in two seperate pages. I want data to be sent from one iView to another .

How can I achieve without having to navigate to the other iview but just send this data to the other iview. Basically I want to hold this data throughout the session until it is killed.

I cannot use WDPortalFire/Subsubscribe methods as the IViews are in two seperate pages, I cannot use Portal Navigation because I do not want to navigate to the second iview but I just want to pass the confirmed data to this iview.

How can I achieve this?

Thanks for all your help in advance.

Best regards,

Divya

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Divya

Can you paste the error trace

Former Member
0 Kudos

Hi All,

Is there a way I could use the client session to achieve this?

Best regards,

Divya

Former Member
0 Kudos

Divya

Please let me know what problem/error you are facing.

Former Member
0 Kudos

Hi All,

I did go through the document that was posted earlier and did exactly as stated in it. Now I get an error Failed to generate URL to deployable object 'local/RSSAccountInfo', application 'RSSAccountInfo'.

where RSSAccountInfo is both my application name and component name.

Where I could I be wrong. Also is there an alternate way I could achieve this like session if so how?

Thanks for all your help in advance.

Best regards,

Divyaqwaa

Former Member
0 Kudos

Hi,

You can use session to make available data selected in iView/page in another.

Saravanan K

Former Member
0 Kudos

hi divya,

u once go through the document i had given in previous post,

r u doing according to the document link that i had given, once cross-check all the operations in that...

u will get that..

regards

sunil

Former Member
0 Kudos
Former Member
0 Kudos

hi Divya Rao,

u go through this following link...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/91b6ad90-0201-0010-efa3-962...

hope it helps u...

regards

-


sunil

Former Member
0 Kudos

Hi All,

When I create an exit plug of type Url(string) it does create the WdFireStartAppExit(string) within the Java class of InterfaceView.

What could be the problem?

Best regards,

Divya

Former Member
0 Kudos

Hi Girish,

With this statement

String Url = WDURLGenerator.getApplicationURL("local/MyProjects","MyProjectAvaya",map);

"local/Myprojects" is the name of the project and

"MyProjectAvaya" is the application name. Am I right?

Best regards,

Divya

Former Member
0 Kudos

Hi All,

I get this error.

Failed to generate URL to deployable object 'local/RSSAccountInfo', application 'RSSAccountInfo'.

Can someone help me resolve this please.

Best regards,

Divya Rao

Former Member
0 Kudos

Divya

Assuming that both the applications are in web dynpro you would have to do something as below to achieve the data transfer.

1. Define an action in your source iview behind a hyperlink say "Go to target app" and build a hashmap for whatever parameters you want to pass to the target iview.

public void onActionLinkmyPrjt(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionLinkmyPrjt(ServerEvent)

Map map = new HashMap ();

map.put("ID1",wdContext.nodePoList().getPoListElementAt(wdContext.nodePoList().getLeadSelection()).getBp());

map.put("ID2",wdContext.nodePoList().getPoListElementAt(wdContext.nodePoList().getLeadSelection()).getPo_Number());

map.put("ID3",wdContext.nodePoList().getPoListElementAt(wdContext.nodePoList().getLeadSelection()).getSitename());

try

{

String Url = WDURLGenerator.getApplicationURL("local/MyProjects","MyProjectAvaya",map);

//wdContext.currentContextElement().setErr(Url);

wdThis.wdGetAvayaMyOrderInterfaceViewController().wdFirePlugCallingMyprojectsApp(Url);

}

catch(Exception e)

{

wdThis.wdGetContext().wdGetAPI().getController().getComponent().getMessageManager().reportSuccess(e.toString());

}

//@@end

}

Please note that in this step we have built the hashmap, and the URL of the target application that you want to go to.

Pass the URL parameter that we have built to the interface view plug defined in the source application.

Define an outbound plug in the Interface view of the source application with a parameter of type string named Url.

3. In the target application when you go from the source application, the control will go to the WDDoInit of the controller. Put the following code in this method for getting back the parameters from the hash map sent from target application.

String param = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("ID1");

String param1 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("ID2");

String param2 = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("ID3");

Now you can use these parameters to display the data on your target view.

Let me know whether this solves your problem