on 12-18-2008 10:30 AM
Hi all,
I want to download a word document template when i click a download button but not using file download element.can anyone suggest me how to do this?
Regards,
Anusha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasanthi,
I have tried the code in the thread
final byte[] content = WDWebResource.getWebResource(content,WDWebResourceType.UNKNOWN);
final IWDCachedWebResource resource =WDWebResource.getWebResource(content, WDWebResourceType.UNKNOWN);
try {
final IWDWindow window =wdComponentAPI.getWindowManager().createExternalWindow(resource.getAbsoluteURL(),"Window title", false);
window.open();
} catch (Exception e) {
wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e),false);
}
But its showing the error that "type mismatch::cannot convert from iwdcachewebresource to byte array"
Regards,
Anusha
You can use the code that gets file from server.. Without using File download UI element
IWDResource resource;
String name = <file name>;
String path = <path> + name;
InputStream stream;
try {
stream = new FileInputStream(path);
resource = WDResourceFactory.createResource( stream, name,
WDWebResourceType.UNKNOWN, true);
stream.close();
wdComponentAPI.getWindowManager()
.createNonModalExternalWindow( resource.getUrl( 0), name).show();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Check this PDF link.
Hope it will help you
Regards
Ruturaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use this pdf
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4210f1088c3a4d71 [original link is broken] [original link is broken] [original link is broken]
http://help.sap.com/SAPHELP_NW04S/helpdata/EN/dc/f1783fe3263042e10000000a114084/frameset.htm
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 |
---|---|
84 | |
10 | |
10 | |
9 | |
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.