on 02-24-2009 6:52 AM
Hi Colleagues
could anyone please let me know how to generate URL for Webdynpro applications?
i am trying it by using the fiollowing code
WDDeployableObjectPart appPart = WDDeployableObject.getPart(u201CTestu201D,u201CTestAppu201D,WDDeployableObjectPart.APPLICATION);
but here i dont know what exactly need to be passed in the arguments of getPart()...could anyone please explain
String resourcePath = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(), resourceName);
and what is to be given here in the resourcename
Thanks a lot in advance
Thanks & Regards
Swetha
Hi,
To get the application URL use
WDDeployableObjectPart deployableObjectPart = wdComponentAPI.getComponent().getDeployableObjectPart();
String appURl = WDURLGenerator.getApplicationURL(deployableObjectPart);
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ayyapparaj,
Thanks for the reply...i have used the code given by you...and i got an error
"com.sap.tc.webdynpro.services.exceptions.WDIllegalArgumentException: Invalid deployable object part type: Component"
i have included this code in component controller in Modify View method
try{
WDDeployableObjectPart deployableObjectPart = wdThis.wdGetAPI().getComponent().getDeployableObjectPart();
String appURl = WDURLGenerator.getApplicationURL(deployableObjectPart);
wdComponentAPI.getMessageManager().reportSuccess(appURl);
}
catch(Exception ex)
{
throw new WDRuntimeException(ex);
}
Please let me know how to proceed further
Thaks & regards
Swetha
Edited by: Swetha Nellore on Feb 24, 2009 10:04 AM
Hi,
Following will help you to get the URL
Replace "TestComp" with that of yours.
String deployableObjectName = wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
try {
WDDeployableObjectPart deployableObjectPart = WDDeployableObject.getDeployableObjectPart(
deployableObjectName, "TestComp", WDDeployableObjectPartType.APPLICATION);
String url = WDURLGenerator.getApplicationURL(deployableObjectPart);
String url1 = WDURLGenerator.getAbsoluteWebResourceURL(deployableObjectPart);
wdComponentAPI.getMessageManager().reportSuccess(url);
wdComponentAPI.getMessageManager().reportSuccess(url1);
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException(e);
}
Regards
Ayyapparaj
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.