cancel
Showing results for 
Search instead for 
Did you mean: 

Using FileDownloadUI Element in TableCellEditor and Calculated Attribute

Amey-Mogare
Contributor
0 Kudos

Hi,

I am displaying list of file names and links to download them in a table.

I want to implement the feature where Open/Save As/Cancel pop up appears when users clicks on download UI element.(Not after selecting row)

Note that I am able to do it with an action defined for onLeadSelection of table:-


try {
	String l_str_LinkValue = wdContext.currentCtx_vn_KmFolderDataElement().getLinkValue();
        String l_str_LinkName = wdContext.currentCtx_vn_KmFolderDataElement().getLinkName();
	URL l_url = new URL(l_str_LinkValue);
	InputStream l_is_inputS = l_url.openStream();  
	IWDResource res = WDResourceFactory.createResource(l_is_inputS, l_str_LinkName, WDWebResourceType.UNKNOWN, true);
	wdContext.currentContextElement().setFileRes(res);
}
catch (Exception e) {
	wdContext.currentContextElement().setFileRes(null);
}

But, I want to fill up Resource of selected row on demand. That is user can directly click on Download link and a pop up appears!

I have seen numerous tutorials about implementing this with FileDownloadUI element as TableCellEditor and Calculated Resource attribute. But I am not able to apply it to my scenario.

So can anybody please guide me step by step on this?

Please help.

Thanks and regards,

Amey Mogare

Accepted Solutions (1)

Accepted Solutions (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Amey Mogare

Check this short tutorial. It shows exactly that you need: [Loading the InputStream at FileDownload on Demand|http://help.sap.com/saphelp_nw70/helpdata/en/42/f6ec5a09321bc7e10000000a11466f/content.htm]

BR, Siarhei

Amey-Mogare
Contributor
0 Kudos

Absolutely superb!!

Thank you Siarhei.

Answers (0)