on 10-20-2008 5:56 AM
Hi Guys,
How can I access at runtime all the files stored under current mimes/components/<My Comp>/<myPictures>.
I would like to have access at runtime to all the pictures stored under the above folder.
Is there such available API.
many thanks
Harry
Hi Harry ,
use this code to access the file at run time
Note: Put the correct file path
IWDResource res = WDResourceFactory.createResource(
new FileInputStream(FilePath"
"wdContext.currentContextElement().getDirectory()
+wdContext.currentContextElement().getFileName()), wdContext.currentContextElement().getFileName(),
WDWebResourceType.DOC, true);
wdComponentAPI.getMessageManager().reportSuccess("=="+FilePath);
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(
res.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),
res.getResourceName());
window.show();
} catch (FileNotFoundException e) {
// ..
}
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
7 | |
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.