cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

downloadLink on button click

mak1
1-Newbie

downloadLink on button click

I have created a service to create a file in repository.

I want to call the service on Button click to download the file, like DataExport widget does.

Is there any way to do that?

3 REPLIES 3
paic
1-Newbie
(To:mak1)

Use the Service GetFileListingWithLinks for this functionality.

This will give you a hyperlink to allow the file to be downloaded.

If it has to look like a button (vs. the Link widget) you can always overlay the Link widget over the top of the Button.

mak1
1-Newbie
(To:paic)

I have already used GetFileListingWithLinks in the Service and it returns downloadLink of the file, the downloadLink is set as SourceURL in the Link Widget, that scenario works perfectly.

But I want to call the Service when user clicks on a Button.

Situation: in my Mashup user sees charts and there is TimeSelector on the chart, I have to call the Service whenever user changes the TimeSelector. In this way a lot of unnecessary files are created. That's why I want to call the Service when user clicks on a Button.

paic
1-Newbie
(To:mak1)

Great! Like I mentioned, you can use the Link Widget overlayed on a Button widget.

Use the TimeSelector Updated event to retrieve the proper link.

Top Tags