on 12-14-2011 5:18 AM
Hi,
I have uploaded excel (demo.xlsx) and pdf (dmo.pdf) files in mime and I wish to launch it (show standard popup with buttons open, save and cancel). How do I achieve using
LinkToUrl (what should I put in reference field)
LinkToAction (Needed code to read from mime and launch it)
Thanks
Amit kumar Jain
You can use a file downlad UI for this purpose.
http://help.sap.com/saphelp_nw04/helpdata/en/c8/32cc6922fb6040a768652aaa0b6879/content.htm
Regards,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Issue resolved.
Thanks to all and points are awarded.
This is the final code just incase anyneeds.
WDWebResourceType FILE_EXT = WDWebResourceType.XLS;
try
{
String resourcePath = WDURLGenerator.getResourcePath(
wdComponentAPI.getDeployableObjectPart(),"portal_users_upload.xls");
IWDResource resource = WDResourceFactory.createResource(
new FileInputStream(new File(resourcePath)),
"portal_users_upload.xls",
FILE_EXT,
true );
if (resource != null)
{
wdContext.currentFiledownloadElement().setDnl_res(resource);
}
}
catch (WDAliasResolvingException e)
{
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(), true);
}
catch (FileNotFoundException e)
{
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(), true);
}
if you have the file in resoucre attribute then write the below code in link to action method:
resource.download
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.