on 06-15-2009 5:05 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.