The inputFile component renders an file input HTML element. Users specify a file to upload
either by entering the path to a file directly, or by clicking the Browse button
to open a file-system navigation dialog window. Clicking the Upload button uploads
the specified file to the server.
The inputFile component can be used to provide a user-specified file upload capability.
Note: The inputFile component must render itself inside a form with its encode type set to
"multipart/form-data". This limitation prevents using the inputFile component inside another form.
| Attributes |
| Name | Required | Request-time | Type | Description |
| id | false | false | java.lang.String |
User-defined id that will override the automatically-generated id.
|
| file | false | false | java.lang.String |
Bean property that will be a reference to the uploaded file.
|
| size | false | false | java.lang.String |
Size of the input text box.
|
| label | false | false | java.lang.String |
Text that will appear on the submit button.
|
| rendered | false | false | java.lang.String | If false, this component will not be rendered. |
| disabled | false | false | java.lang.String |
Flag indicating that this element must never
receive focus or be included in a subsequent
submit.
|
| enabledOnUserRole | false | false | java.lang.String |
If user is in given role, this component will be rendered normally. If not, the component will be
in disabled state.
|
| binding | false | false | java.lang.String | Component binding. |
| immediate | false | false | java.lang.String | Flag indicating that this component's value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until Process Validations phase. |
| readonly | false | false | java.lang.String | Flag indicating that this component will prohibit
changes by the user. The element may receive focus
unless it has also been disabled.
|
| validator | false | false | java.lang.String | MethodBinding pointing at a method that will be called during Process Validations phase of the request processing lifecycle, to validate the current value of this component. |
| valueChangeListener | false | false | java.lang.String | Listener for value changes. |
| accept | false | false | java.lang.String | Passed through to root element. |
| action | false | false | java.lang.String | MethodBinding pointing at the application action to be invoked, if this UIComponent is activated by the user, during the Apply Request Values or Invoke Application phase of the request processing lifecycle, depending on the value of the immediate property. |
| actionListener | false | false | java.lang.String | MethodBinding pointing at method accepting an ActionEvent with return type void. |
| accesskey | false | false | java.lang.String | Passed through to root element. |
| alt | false | false | java.lang.String | Passed through to root element. |
| maxlength | false | false | java.lang.String | Passed through to root element. |
| onblur | false | false | java.lang.String | Passed through to root element. |
| onchange | false | false | java.lang.String | Passed through to root element. |
| onfocus | false | false | java.lang.String | Passed through to root element. |
| onselect | false | false | java.lang.String | Passed through to root element. |
| tabindex | false | false | java.lang.String | Passed through to root element. |
| styleClass | false | false | java.lang.String | Base Name for style class names:
baseNameText = Style of file select input text
baseNameButton = Style of the upload button
|
| renderedOnUserRole | false | false | java.lang.String |
If user is in given role, this component will be rendered normally. If not, nothing is
rendered and the body of this tag will be skipped.
|