Skip to Content

FileDownload UI Element

Hy all,

i want to implement the Function of the FileDownload UIElement to a normal Button. If the Button was pressed the download of the file should be starts.

What is the best way to implement this scenario ?

First i have implemented the "normal" FileDownload with the UI Element and it works fine !

My question is, on which place(wdDoInit, wdDoModifyView) i must create ("dynamicly" ?) a FileDownload Element and how ?

Is there a Methode to combine a Button with a FileDownload UI Element ?

Thanks for help.


J. Berndt

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 19, 2004 at 09:40 PM


    Use the IWDFileDownload UI element itself for this task. If you want to change its visual design, you could change the stylesheet/theme. There are articles on how to do this in the SDN Developer Area section for Web Dynpro.

    To create a IWDFileDownload or any other UI element programmatically, you have to write code in method wdDoModifyView():

    IWDFileDownload fd = (IWDFileDownload) view.createElement(IWDFileDownload.class, <id>);
    /* bind it's properties to context attributes... */
    fd.bindXYZ(<context path>);
    /* add it to some container... */


    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 20, 2004 at 03:51 AM

    Hi Jurgen

    The File Download element can use an image instead of link to action a download.

    You can make this image look like a Web Dynpro button or just a symbolic image (to bypass multilingual requirements if you have any)




    Message was edited by: Pran Bhas

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jürgen Berndt

      Hello Jürgen,

      we faced the same problem. I wanna share my experience: We had a table of FileDownload Elements and it would not be feasible to load all of them just because a user might click them. This is way to slow and memory consuming.

      First solution was to have two controls, a "download" button and a FileDownload control which becomes active only after downloading the file.

      People were not understanding this, no usability at all.

      Our current approach to workaround this issue is to have a link which just opens up a webdynpro popup window which than loads the specific file and provides it via a download link (and possibly some more information on the file). Not the best solution also but it leads the user better... this works pretty good now