on 05-10-2008 11:18 PM
Hi all,
I have a table with two fields. In the first table column, I am using 'linktourl' ui element and it takes us to that specific url displayed.This is working fine.
But,in the second table column,When I click on a link, I have to give a link to a file server(for eg:
Server10\MyFolder...).
How can I give link to some server file system from web dynpro application?
If I use Class 'File', how can I go-ahead with this?Please give some thoughts.
Thanks
Anjana
Hi,
Please Refer this doc.
Creating A Directory On WAS Server at Desired Location and Uploading File in It Using Web Dynpro for Java
Thanks
Abhilasha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use IWDCachedResouce:
String fileName = "c:
myFile.jpg";
File f = new File(fileName);
FileInputStream fileInputStream = new FileInputStream(f);
IWDCachedWebResource cachedWebResource = WDWebResource.getWebResource(fileInputStream, fileName,
WDWebResourceType.JPG_IMAGE);
cachedWebResource.setResourceName(fileName);
String url = cachedWebResource .getURL();
set the url in to the linkToAction UI element and that's it...
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Omri,
Thanks for your immediate response.
I tried your suggestions like this onActionLinkToAction:
try{
String fileName = "C: Test.jpg";
File f = new File(fileName);
FileInputStream fileInputStream = new FileInputStream(f);
IWDCachedWebResource cachedWebResource = WDWebResource.getWebResource(fileInputStream,WDWebResourceType.JPG_IMAGE);
//IWDCachedWebResource cachedWebResource = WDWebResource.getWebResource
(fileInputStream, fileName, WDWebResourceType.JPG_IMAGE);(If I uncomment this, its giving error: cannot convert from IWDWebResource to IWDCachedWebResource)
cachedWebResource.setResourceName(fileName);
String url = cachedWebResource .getURL();
//Now where should I set this string url to in the LinkToActionUI element? I tried setting to property 'text'
}
catch(Exception e){
e.printStackTrace();
}
Thanks
Anjana
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.