fileUpload (RichFaces JSF components library Tag library documentation)
Keywords: $title

Overview | Library | Tag | Help
| FRAMES NO FRAMES

## RichFaces ( Legacy URL )
Tag fileUpload

Renders a file upload control. The following configuration options for ajax4jsf filter may be configured in web.xml: * createTempFiles - if this option is set to true, uploaded files are streamed to a temporary file instead of in memory. * maxRequestSize - the maximum size of a file upload request, in bytes. Here's an example: <filter> <display-name>Ajax4jsf Filter</display-name> <filter-name>ajax4jsf</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> <init-param> <param-name>createTempFiles</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>maxRequestSize</param-name> <param-value>20000000</param-value> </init-param> </filter>

Tag Information
Tag Class | org.richfaces.taglib.FileUploadTag
TagExtraInfo Class | None
Body Content | JSP
Display Name | None

Attributes
Name | Required | Request-time | Type | Description
acceptedTypes | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | Files types allowed to upload
accesskey | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | This attribute assigns an access key to an element. An access key is a single character from the document character set. Note: Authors should consider the input method of the expected reader when specifying an accesskey
addButtonClass | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for add button
addButtonClassDisabled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for add button disabled
addControlLabel | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
align | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | left|center|right|justify [CI] Deprecated. This attribute specifies the horizontal alignment of its element with respect to the surrounding context. Possible values: * left: text lines are rendered flush left. * center: text lines are centered. * right: text lines are rendered flush right. * justify: text lines are justified to both margins. The default depends on the base text direction. For left to right text, the default is align=left, while for right to left text, the default is align=right
alt | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | For a user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute
autoclear | false | false | `javax.el.ValueExpression` (must evaluate to `boolean`) | If this attribute is true files will be immediatelly removed from list after upload completed
binding | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | The attribute takes a value-binding expression for a component property of a backing bean
cancelButtonClass | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for cancel button
cancelButtonClassDisabled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for cancel button disabled
cancelEntryControlLabel | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
cleanButtonClass | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for clean button
cleanButtonClassDisabled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for clean button disabled
clearAllControlLabel | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
clearControlLabel | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
contentType | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | the property to receive the contentType
converter | false | false | `javax.el.ValueExpression` (must evaluate to `javax.faces.convert.Converter`) | Id of Converter to be used or reference to a Converter
converterMessage | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | converterMessage
disabled | false | false | `javax.el.ValueExpression` (must evaluate to `boolean`) | Disabled attribute
fileEntryClass | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style upload file entry
fileEntryClassDisabled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style upload file entry disabled
fileEntryControlClass | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for upload enrty control
fileEntryControlClassDisabled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for upload enrty control disabled
fileName | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | this value binding receives the filename (optional).
fileSize | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Integer`) | this value binding receives the file size (optional).
fileUploadListener | false | false | `javax.el.MethodExpression` (signature must match `void fileUploadListener(org.richfaces.event.UploadEvent)`) | MethodExpression representing an action listener method that will be notified after file uploaded.
id | false | false | `java.lang.String` | Every component may have a unique id that is automatically created if omitted
immediate | false | false | `javax.el.ValueExpression` (must evaluate to `boolean`) | A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase
listHeight | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | Defines height of file list
listWidth | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | Defines width of file list
localContentType | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | localContentType
localFileName | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | localFileName
localFileSize | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Integer`) | localFileSize
localInputStream | false | false | `javax.el.ValueExpression` (must evaluate to `java.io.InputStream`) | localInputStream
localValueSet | false | false | `javax.el.ValueExpression` (must evaluate to `boolean`) | localValueSet
locale | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Object`) | locale
maxFilesQuantity | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Integer`) | Defines max files count allowed for upload (optional).
maxlength | false | false | `javax.el.ValueExpression` (must evaluate to `int`) | When the type attribute has the value "text" or "password", this attribute specifies the maximum number of characters you may enter. This number may exceed the specified size, in which case the user agent should offer a scrolling mechanism. The default value for this attribute is an unlimited number
onblur | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: script expression; the element lost the focus
onchange | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: script expression; the element value was changed
onclick | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: a script expression; a pointer button is clicked
ondblclick | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: a script expression; a pointer button is double-clicked
onerror | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
onfocus | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: script expression; the element got the focus
onkeydown | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: a script expression; a key is pressed down
onkeypress | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: a script expression; a key is pressed and released
onkeyup | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: a script expression; a key is released
onmousedown | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: script expression; a pointer button is pressed down
onmousemove | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: a script expression; a pointer is moved within
onmouseout | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: a script expression; a pointer is moved away
onmouseover | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: a script expression; a pointer is moved onto
onmouseup | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: script expression; a pointer button is released
onselect | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | HTML: script expression; The onselect event occurs when you select some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements
onupload | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
onuploadcanceled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
onuploadcomplete | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
progressInfo | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | Defines bean name where progress info should be stored (optional).
rendered | false | false | `javax.el.ValueExpression` (must evaluate to `boolean`) | If "false", this component is not rendered
required | false | false | `javax.el.ValueExpression` (must evaluate to `boolean`) | If "true", this component is checked for non-empty input
requiredMessage | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | requiredMessage
size | false | false | `javax.el.ValueExpression` (must evaluate to `int`) | This attribute tells the user agent the initial width of the control. The width is given in pixels except when type attribute has the value "text" or "password". In that case, its value refers to the (integer) number of characters
stopControlLabel | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
stopEntryControlLabel | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
style | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style(s) is/are to be applied when this component is rendered
styleClass | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | Corresponds to the HTML class attribute
tabindex | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros
uploadButtonClass | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for upload button
uploadButtonClassDisabled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for upload button disabled
uploadControlLabel | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | ${prop.xmlEncodedDescription}
uploadData | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Object`) | Collection of files uploaded
uploadListClass | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for upload list
uploadListClassDisabled | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | CSS style for upload list disabled
valid | false | false | `javax.el.ValueExpression` (must evaluate to `boolean`) | valid
validator | false | false | `javax.el.MethodExpression` (signature must match `void validator(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)`) | MethodBinding pointing at a method that is called during Process Validations phase of the request processing lifecycle, to validate the current value of this component
validatorMessage | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.String`) | validatorMessage
value | false | false | `javax.el.ValueExpression` (must evaluate to `java.lang.Object`) | The initial value to set when rendered for the first time
valueChangeListener | false | false | `javax.el.MethodExpression` (signature must match `void valueChangeListener(javax.faces.event.ValueChangeEvent)`) | Listener for value changes

Variables
| No Variables Defined.

Overview | Library | Tag | Help
| FRAMES NO FRAMES

Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.