3 Replies Latest reply on Jul 7, 2015 8:03 AM by paic RSS
    mak Explorer

    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?

      • Re: downloadLink on button click
        paic Collaborator

        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.

          • Re: downloadLink on button click
            mak Explorer

            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.