Download

Description: Generates a download link for a given url or list of urls.

Remarks: This tag assumes that the urls are valid and simply links them. The urls are infered in their file extension so the proper mime type image is displayed.

JavaDoc: Click here

Body content: Empty.

Attributes:

Name Description Data type Required Default value
id The id to set to the generated link HTML element for binding purposes String No An auto-generated one
urls A comma separated list of URLs to link String Yes
layout The layout format to render the links String No normal
mimetype The mimetype to use visually. Only changes the visual representation of the download link. Does not infer the real document mime-type. String No detects from the file extension of the url if available
message The message for the download link String Yes
description The description text String No

Layout values: Available layouts:

  • normal: Normal layout. Title, description and link all in seerated lines.
  • inline: Title and link in a single line. reverts to normal layout if a description exists.
  • minimal: Title is the description of the link. reverts to normal layout if a description exists.

Some examples can be seen bellow.

Examples:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/difcore" prefix="dif"%>
<dif:document>
    <dif:download urls="report.xls" layout="inline" message="Sales report for 2008" />
    <dif:download urls="presentation.pdf" message="Company presentation"
        description="Company presentation. Covers our business areas, product list and services we provide." />
</dif:document>

Back to tag reference