Show TOC

 FileDownloadLocate this document in the navigation structure

Definition

Using the FileDownload element, the user can load a file from the server to the client to store it there or to open it in the appropriate program. The look of the FileDownload elements resembles a link, because the representation is determined by the type property, which provides the option of indicating whether the user has clicked the element before.

The data source, that is the file to be downloaded is determined by the resource property. The target property determines the ID of the target window in the browser.

Description of UI Element Properties
  • activateAccessKey

Indicates whether access key for the FileDownload is activated. More information: Enabling Access Keys

  • behaviour

    determines the behavior after the user has clicked the FileDownload element.behaviouris of enumeration type WDFileDownloadBehaviour and can take the following values:

    • allowSave

      An Open/Save dialog box appears. The user can directly save the file locally or open it with the appropriate program.

    • auto

      The behavior is predefined and depends on the MIME type of the file to be downloaded. The list below describes the behavior for the individual file types; false means that the attachment is opened in the same window, whereas for true a new window is opened.

      Constant File Extension MIME Type acc. W3C Attachment

      APPLET

      "jar"

      "application/x-java"

      true

      CSS

      "css"

      "text/css"

      false

      DOC

      "doc"

      "application/vnd.ms-word"

      "application/x-msword"

      false

      FLASH

      "swf"

      "application/x-shockwave-flash"

      false

      GIF_IMAGE

      "gif"

      "image/gif"

      false

      HTML

      "html"

      "text/html"

      false

      JAVA

      "java"

      "application/x-java"

      false

      JAVA_SCRIPT

      "js"

      "text/js"

      false

      JPG_IMAGE 

      "jpg" 

      "image/jpeg" 

      false

      PDF

      "pdf"

      "application/pdf"

      false

      PNG

      "png"

      "image/x-png"

      false

      PPT

      "ppt" 

      "application/vnd.ms-powerpoint" "application/x-mspowerpoint"

      false

      PS

      "ps"

      "application/postscript"

      false

      RTF

      "rtf"

      "application/rtf" 

      false

      SVG

      "svg"

      "image/svg+xml"

      false

      TXT

      "txt"

      "text/plain"

      false

      UNKNOWN

      ""

      ""

      true

      VML

      "vml"

      "text/vml"

      false

      WD_APPLICATION

      ""

      ""

      false

      XLS

      "xls"

      "application/vnd.ms-excel"

      "application/x-msexcel"

      false

      XML 

      "xml"

      "text/xml"

      false

      XML_CONFIGURATION

      "xml"

      "text/xml"

      true

    • openInplace

      The file is opened in the appropriate application program within the current window. Which program is opened, depends on the MIME type of the file.

  • data

    This property is deprecated, use resource instead.

  • design

    specifies the design of the FileDownload. The designproperty can be take the following values and is represented by enumeration type WDLinkDesign.

    • emphasized. Highlights the text.
    • standard. Displays the text using the standard font size.
  • imageFirst

    Defines the position of the icon in relation to the corresponding text. If the value of this property is true, the icon is displayed to the left of the text.

  • imageHeight

    Determines the height of the graphic next to the FileDownload link. You can specify the height in CSS units like em, ex, pixels, or percentage.

  • imageSource

    defines the path to the image source.

    More Information: Specifying the Image Source

  • imageWidth

    Determines the width of the graphic next to the FileDownload link. You can specify the width in CSS units like em, ex, pixel, or percentage.

  • resource

    Specifies the data source and contains the data, the file name, and the MIME type. The resource property must be bound to a context attribute of the type IWDResource.

  • size

    The property size is deprecated and can no longer be used.

  • target

    Specifies the browser window in which the page is to be opened. You can manually specify the name of the target window or use the following values:

    • ""The page is opened in a new window without a name. For every file download a new window will be opened
    • _self is no longer supported. Use exit plugs instead and specify the URL there.
    • "<window name>". You can specify a window name as string. For every file download the same window will be opened.
  • text

    Describes a label text.

  • textDirection

    Specifies the text direction and allows you to read the texts of subordinated UI elements in languages which require a specific text direction. The textDirection property can be take the following values and is represented by enumeration type WDTextDirection.

    inherit

    The text direction is inherited from the parent element. Therefore, the text direction is identical to the one of the parent element.

    ltr

    The text runs from left to right.

    rtl

    The text runs from right to left.

    The default value for this property is inherit.

  • type

    Describes the graphical representation of the FileDownload element. The type property can be filled with the following values and is represented by the enumeration type WDLinkType.

    function

    The UI element appears in the standard design and underlined.

    navigation

    The UI element appears underlined and in the color used for links that the user has already visited.

    reporting

    The UI element appears in the standard design and not underlined.

    result

    The UI element appears not underlined.

  • wrapping

    Indicates whether or not the text of the FileDownload element is wrapped. If the initial value is false, the text is not wrapped.

Properties Overview
Name Interface Type Initial Value bindable

activateAccessKey

IWDLink

boolean

false

not bindable

behaviour

IWDFileDownload

WDFileDownloadBehaviour

auto

bindable

data

IWDFileDownload

Object

 

bindable_mandatory

design

IWDLink

WDLinkDesign

standard

bindable

enabled

IWDUIElement

boolean

true

bindable

imageFirst

IWDAbstractCaption

boolean

true

bindable

imageHeight

IWDLink

String

 

bindable

imageSource

IWDAbstractCaption

String

 

bindable

imageWidth

IWDLink

String

 

bindable

resource

IWDFileDownload

IWDResource

 

bindable_mandatory

size

IWDLink

WDLinkSize

standard

bindable

target

IWDFileDownload

String

 

bindable

text

IWDLink

String (TranslatableText)

 

bindable

textDirection

IWDAbstractCaption

WDTextDirection

inherit

bindable

tooltip

IWDUIElement

String (TranslatableText)

 

bindable

type

IWDFileDownload

WDLinkType

navigation

bindable

visible

IWDUIElement

WDVisibility

visible

bindable

wrapping

IWDLink

boolean

false

bindable