Tobago Demo

Menu

File Upload

The <tc:file/> create an input field with a choose directory button on the right.

Tag Library Documentation

Basics

<tc:file label="Upload" value="#{uploadController.file1}"/>
For this demo the required attribute is set to false, for better playing around with is. You may activate it with the switch below.

Content type and size

You can filter files using the <tc:validateFileItem/> tag within the <tc:file/>. In the following example only images and PDF files are excepted. Max size is 1 MB

Placeholder

Define a text with placeholder attribute

Markups

The size can be changed with markup large or small.

Multiple files

You can upload multiple files in one selection and request. Use the multiple="true" attribute.

Ajax

Ajax can be activated by adding <f:ajax/> to the <tc:file/> tag.

Drop Zone

Drop Zone without Label

Drop Zone with Ajax

Uploaded Files

NameTypeSizeUsed Action
No rows available
© 2005-2024 Apache Software Foundation, Licensed under the Apache License, Version 2.0.