cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation between two webdynpro applications

Former Member
0 Kudos

Hi Colleagues,

Please let me know some workaround for the below requirement

here i have two webdynpro application, where i have to call the second application from a button of first application by passing a parameter

please let me know hoe to proceed here

i have some information attached below....Is it the right way to do it? or am i missing somethinng here

String deployableObjectName =  wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
		   
  Map urlParameters = new HashMap();
		   
  try {
		   
	 urlParameters.put("A",CVNR);
WDDeployableObjectPart deployableObjectPart =WDDeployableObject.getDeployableObjectPart(
 "a1s~cc~checkprerequisites","Preq",WDDeployableObjectPartType.APPLICATION);
String urlToTargetApp =WDURLGenerator.getApplicationURL(deployableObjectPart, urlParameters);
		   
  IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlToTargetApp);
 window.show();
}
catch (WDURLException e) {
		  wdComponentAPI.getMessageManager().reportException(e.getLocalizedMessage(), false);
		  } catch (WDDeploymentException ex) {
			  wdComponentAPI.getMessageManager().reportException(ex.getLocalizedMessage(), false);
		  }

Thanks & Regards

Swetha

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Swetha,

Please try this code in the application which is now launched from the 1st application. You can write this code in the wdDoinit() method OR the firstTime loop of the wdDoModify function:


String applicationParam = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("A");

Here "A" is the name of the attribute in which you are setting the parameter value CVNR.

You will get the URL parameter you have passed to this application from the first application. I hope this solves your problem, if yu have any issues please contact back.

Thanks and Regards,

Pravesh

Former Member
0 Kudos

Hi Pravesh

The above code is getting the parameters from the URL, But in the code it is Showing "WDWebContextAdapter" is deprecated.

Can i use the same method or is there any alternative?

Thanks & Regards

Swetha

pravesh_verma
Active Contributor
0 Kudos

Hi Swetha,

If WDWebContextAdapter is showing you as depricated then try and use this way of getting the URL parameter:


WDProtocolAdapter.getProtocolAdapter().getRequestParameter("A");

I hope this helps. Please revert back in case you need further information on this.

Thanks and Regards,

Pravesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

I am able to launch an application using the above mentioned code,

Here i am setting an parameter to an application also...HEre i have do some coding using the parameter in the second application, Please let me know how to Get the parameter in the URL in the second application.

Thanks & Regards

Swetha