fileDownload - File Download

Downloads a file to the local file system.

Category

Core Controls

Syntax

<xp:fileDownload attributes>content</xp:fileDownload>
Table 1. Essential properties
Property Description
id Defaults to fileDownload1, fileDownload2, and so on.
value Binds the file control to a data element or other value which must be of type rich text.
mimetype Forces the MIME type of the download rather than letting it be determined by the file type.
useUploadName By default the original file name is used.
filename Specifies the attachment name if you do not use the original file name.
Table 2. All properties
Category Properties
accessibility accesskey, role, tabindex, title
Note: The role property is obsolete starting with 9.0.1. By default the appropriate compliant value is generated. For compliance with accessibility standards, do not specify a value for this property.
basics attrs, allowDelete, binding, createdTitle, createdValue, deleteImageTitle, deleteMessage, dir, disabled, displayCreated, displayLastModified, displaySize, displayType, fileNameHrefValue, fileNameTitle, fileNameValue, hideWhen, id, lang, lastModifiedTitle, lastModifiedValue, loaded, rendered, rendererType, rowAttrs, rules, sizeTitle, sizeValue, typeTitle, typeValue
data data, first, indexVar, rows, value, var
events onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup
format bgcolor, border, cellpadding, cellspacing, frame, width
styling captionStyleClass, columnClasses, createdStyleClass, deleteStyleClass, disableTheme, footerClass, headerClass, modifiedStyleClass, nameStyleClass, rowClasses, sizeStyleClass, style, styleClass, themeId, typeStyleClass

Usage

At run time, information about any attached files appears on the page. This may include file type, size, name, modification date, creation date, and whether the user can delete the attached file. The user can click on the name to access a file browser to download the attached file.

Examples

This File Download control allows the user to download a file from the Body item of a document.
<xp:fileDownload rows="30" id="fileDownload1"
	displayLastModified="false" value="#{document2.body}">
</xp:fileDownload>