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.

Regards

J. Berndt

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2004 at 09:40 PM

    Hello.

    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... */
    container.addChild(fd);
    

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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)

    ;-B

    Regards

    Pran

    Message was edited by: Pran Bhas

    Add a 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

      Regards

      Bruno

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.