on 11-25-2009 7:25 AM
I have uploaded the file but i need the path from where it is located.How to get it dynamically...
Thanks
Nitti
Hi Friend,
You can also try this.
IWDResource reSource ;
String path = reSource.getUrl(fileDownloadBehaviour);
Regards
Jeetendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitti,
Hopefully you have uploaded the file(say excel sheet) in the context (Va_TestResource) of your web Dynpro application in WDResource form.
You can convert this WDResource to byte array and then to iwdwebresource. Now using this you can get the URL for the file.
IWDResource res = wdContext.currentContextElement().getVa_TestResource();
if(res!= null){
try {
InputStream i_is_FileStream = res.read(false);
int i_int_NoOfBytes = i_is_FileStream.available();
byte [] byteArray = new byte [ i_int_NoOfBytes ];
int i_int_byteRead = i_is_FileStream.read(byteArray, 0, i_int_NoOfBytes);
IWDWebResource webRe = WDWebResource.getWebResource(byteArray, WDWebResourceType.XLS);
webRe.getURL();
} catch (IOException e) {
} catch (WDURLException e) {
}
}
Hope your issue is addressed
Regards,
Tushar Sinha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try this
\WDURLGenerator.getResourcePath( wdComponentAPI.getDeployableObjectPart(),View.FILE_NAME);
regards,
Ramani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.