org.richfaces.component

## Class UIFileUpload

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - org.richfaces.component.AbstractFileUpload
      - - org.richfaces.component.UIFileUpload

- All Implemented Interfaces:
    EventListener, javax.faces.component.behavior.ClientBehaviorHolder, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder

      @Generated(value={"RichFaces CDK","4.5.0-SNAPSHOT"})
      public class UIFileUpload
      extends AbstractFileUpload
      implements javax.faces.component.behavior.ClientBehaviorHolder

  The <rich:fileUpload> component allows the user to upload files to a server. It features multiple uploads, progress bars, restrictions on file types, and restrictions on sizes of the files to be uploaded.

  Author:
    Konstantin Mishin, Lukas Fryc, Simone Cinti

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `UIFileUpload.Properties`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPONENT_FAMILY`
    `static String` | `COMPONENT_TYPE`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UIFileUpload()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAcceptedTypes()` Defines comma separated list of file extensions accepted by component.
    `String` | `getAddLabel()` The label for the Add button.
    `String` | `getClearAllLabel()` The label for the Clear button.
    `String` | `getClearLabel()` The label displayed for the Clear link
    `Object` | `getData()`
    `String` | `getDefaultEventName()`
    `String` | `getDeleteLabel()` The label displayed for the Delete link
    `String` | `getDir()`
    `String` | `getDoneLabel()` The label displayed when a file is successfully uploaded.
    `Collection<String>` | `getEventNames()`
    `Object` | `getExecute()`
    `String` | `getFamily()`
    `javax.el.MethodExpression` | `getFileUploadListener()`
    `String` | `getLang()`
    `String` | `getListHeight()` Defines height of file list.
    `Integer` | `getMaxFilesQuantity()` Defines maximum number of files allowed to be uploaded.
    `String` | `getOnbeforedomupdate()`
    `String` | `getOnbegin()`
    `String` | `getOnclear()` Javascript code executed when a file is cleared
    `String` | `getOnclick()`
    `String` | `getOncomplete()`
    `String` | `getOndblclick()`
    `String` | `getOnfileselect()` Javascript code executed when a file is selected
    `String` | `getOnfilesubmit()` Javascript code executed when a file is submitted
    `String` | `getOnkeydown()`
    `String` | `getOnkeypress()`
    `String` | `getOnkeyup()`
    `String` | `getOnmousedown()`
    `String` | `getOnmousemove()`
    `String` | `getOnmouseout()`
    `String` | `getOnmouseover()`
    `String` | `getOnmouseup()`
    `String` | `getOntyperejected()` Javascript code executed when a file does not meet the conditions stated by acceptedTypes parameter.
    `String` | `getOnuploadcomplete()` Javascript code executed when a file upload is complete
    `Object` | `getRender()`
    `String` | `getServerErrorLabel()` The label displayed when a file upload fails due to a server error.
    `String` | `getSizeExceededLabel()` The label displayed when a file exceeds the size limit.
    `String` | `getStatus()`
    `String` | `getStyle()`
    `String` | `getStyleClass()`
    `String` | `getTitle()`
    `String` | `getUploadLabel()` The label for the Add button.
    `boolean` | `isDisabled()` If "true", this component is disabled
    `boolean` | `isImmediateUpload()` If "true" upload stats immediately after file selection
    `boolean` | `isLimitRender()`
    `boolean` | `isNoDuplicate()` If "true" duplicate file uploads are prevented
    `void` | `setAcceptedTypes(String acceptedTypes)`
    `void` | `setAddLabel(String addLabel)`
    `void` | `setClearAllLabel(String clearAllLabel)`
    `void` | `setClearLabel(String clearLabel)`
    `void` | `setData(Object data)`
    `void` | `setDeleteLabel(String deleteLabel)`
    `void` | `setDir(String dir)`
    `void` | `setDisabled(boolean disabled)`
    `void` | `setDoneLabel(String doneLabel)`
    `void` | `setExecute(Object execute)`
    `void` | `setFileUploadListener(javax.el.MethodExpression fileUploadListener)`
    `void` | `setImmediateUpload(boolean immediateUpload)`
    `void` | `setLang(String lang)`
    `void` | `setLimitRender(boolean limitRender)`
    `void` | `setListHeight(String listHeight)`
    `void` | `setMaxFilesQuantity(Integer maxFilesQuantity)`
    `void` | `setNoDuplicate(boolean noDuplicate)`
    `void` | `setOnbeforedomupdate(String onbeforedomupdate)`
    `void` | `setOnbegin(String onbegin)`
    `void` | `setOnclear(String onclear)`
    `void` | `setOnclick(String onclick)`
    `void` | `setOncomplete(String oncomplete)`
    `void` | `setOndblclick(String ondblclick)`
    `void` | `setOnfileselect(String onfileselect)`
    `void` | `setOnfilesubmit(String onfilesubmit)`
    `void` | `setOnkeydown(String onkeydown)`
    `void` | `setOnkeypress(String onkeypress)`
    `void` | `setOnkeyup(String onkeyup)`
    `void` | `setOnmousedown(String onmousedown)`
    `void` | `setOnmousemove(String onmousemove)`
    `void` | `setOnmouseout(String onmouseout)`
    `void` | `setOnmouseover(String onmouseover)`
    `void` | `setOnmouseup(String onmouseup)`
    `void` | `setOntyperejected(String ontyperejected)`
    `void` | `setOnuploadcomplete(String onuploadcomplete)`
    `void` | `setRender(Object render)`
    `void` | `setServerErrorLabel(String serverErrorLabel)`
    `void` | `setSizeExceededLabel(String sizeExceededLabel)`
    `void` | `setStatus(String status)`
    `void` | `setStyle(String style)`
    `void` | `setStyleClass(String styleClass)`
    `void` | `setTitle(String title)`
    `void` | `setUploadLabel(String uploadLabel)`

    - ### Methods inherited from class org.richfaces.component.AbstractFileUpload

      `acceptsFile, addFileUploadListener, getAcceptedTypesList, getFileUploadListeners, processEvent, queueEvent, removeFileUploadListener`

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder

      `addClientBehavior, getClientBehaviors`

- - ### Field Detail

    - #### COMPONENT_TYPE

          public static final String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### COMPONENT_FAMILY

          public static final String COMPONENT_FAMILY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### UIFileUpload

          public UIFileUpload()

  - ### Method Detail

    - #### getFamily

          public String getFamily()

      Specified by:
        `getFamily` in class `javax.faces.component.UIComponent`

    - #### getEventNames

          public Collection<String> getEventNames()

      Specified by:
        `getEventNames` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `getEventNames` in class `javax.faces.component.UIComponentBase`

    - #### getDefaultEventName

          public String getDefaultEventName()

      Specified by:
        `getDefaultEventName` in interface `javax.faces.component.behavior.ClientBehaviorHolder`
      Overrides:
        `getDefaultEventName` in class `javax.faces.component.UIComponentBase`

    - #### getAcceptedTypes

          public String getAcceptedTypes()

      Description copied from class: `AbstractFileUpload`
      Defines comma separated list of file extensions accepted by component. The component does not provide any feedback when rejecting file. For introducing feedback for rejection, use ontyperejected parameter.
      Specified by:
        `getAcceptedTypes` in class `AbstractFileUpload`

    - #### setAcceptedTypes

          public void setAcceptedTypes(String acceptedTypes)

    - #### getAddLabel

          public String getAddLabel()

      Description copied from class: `AbstractFileUpload`
      The label for the Add button.
      Specified by:
        `getAddLabel` in class `AbstractFileUpload`

    - #### setAddLabel

          public void setAddLabel(String addLabel)

    - #### getClearAllLabel

          public String getClearAllLabel()

      Description copied from class: `AbstractFileUpload`
      The label for the Clear button.
      Specified by:
        `getClearAllLabel` in class `AbstractFileUpload`

    - #### setClearAllLabel

          public void setClearAllLabel(String clearAllLabel)

    - #### getClearLabel

          public String getClearLabel()

      Description copied from class: `AbstractFileUpload`
      The label displayed for the Clear link
      Specified by:
        `getClearLabel` in class `AbstractFileUpload`

    - #### setClearLabel

          public void setClearLabel(String clearLabel)

    - #### getData

          public Object getData()

    - #### setData

          public void setData(Object data)

    - #### getDeleteLabel

          public String getDeleteLabel()

      Description copied from class: `AbstractFileUpload`
      The label displayed for the Delete link
      Specified by:
        `getDeleteLabel` in class `AbstractFileUpload`

    - #### setDeleteLabel

          public void setDeleteLabel(String deleteLabel)

    - #### getDir

          public String getDir()

    - #### setDir

          public void setDir(String dir)

    - #### isDisabled

          public boolean isDisabled()

      Description copied from class: `AbstractFileUpload`
      If "true", this component is disabled
      Specified by:
        `isDisabled` in class `AbstractFileUpload`

    - #### setDisabled

          public void setDisabled(boolean disabled)

    - #### getDoneLabel

          public String getDoneLabel()

      Description copied from class: `AbstractFileUpload`
      The label displayed when a file is successfully uploaded.
      Specified by:
        `getDoneLabel` in class `AbstractFileUpload`

    - #### setDoneLabel

          public void setDoneLabel(String doneLabel)

    - #### getExecute

          public Object getExecute()

    - #### setExecute

          public void setExecute(Object execute)

    - #### getFileUploadListener

          public javax.el.MethodExpression getFileUploadListener()

    - #### setFileUploadListener

          public void setFileUploadListener(javax.el.MethodExpression fileUploadListener)

    - #### isImmediateUpload

          public boolean isImmediateUpload()

      Description copied from class: `AbstractFileUpload`

      If "true" upload stats immediately after file selection

      Default is "false"

      Specified by:
        `isImmediateUpload` in class `AbstractFileUpload`

    - #### setImmediateUpload

          public void setImmediateUpload(boolean immediateUpload)

    - #### getLang

          public String getLang()

    - #### setLang

          public void setLang(String lang)

    - #### isLimitRender

          public boolean isLimitRender()

    - #### setLimitRender

          public void setLimitRender(boolean limitRender)

    - #### getListHeight

          public String getListHeight()

      Description copied from class: `AbstractFileUpload`

      Defines height of file list.

      Default value is "210px".

      Specified by:
        `getListHeight` in class `AbstractFileUpload`

    - #### setListHeight

          public void setListHeight(String listHeight)

    - #### getMaxFilesQuantity

          public Integer getMaxFilesQuantity()

      Description copied from class: `AbstractFileUpload`
      Defines maximum number of files allowed to be uploaded. After a number of files in the list equals to the value of this attribute, "Add" button disappears and nothing could be uploaded even if you clear the whole list. In order to upload files again you should rerender the component. (Negative numbers means no limits; default value -1).
      Specified by:
        `getMaxFilesQuantity` in class `AbstractFileUpload`

    - #### setMaxFilesQuantity

          public void setMaxFilesQuantity(Integer maxFilesQuantity)

    - #### isNoDuplicate

          public boolean isNoDuplicate()

      Description copied from class: `AbstractFileUpload`

      If "true" duplicate file uploads are prevented

      Default is "false"

      Specified by:
        `isNoDuplicate` in class `AbstractFileUpload`

    - #### setNoDuplicate

          public void setNoDuplicate(boolean noDuplicate)

    - #### getOnbeforedomupdate

          public String getOnbeforedomupdate()

    - #### setOnbeforedomupdate

          public void setOnbeforedomupdate(String onbeforedomupdate)

    - #### getOnbegin

          public String getOnbegin()

    - #### setOnbegin

          public void setOnbegin(String onbegin)

    - #### getOnclear

          public String getOnclear()

      Description copied from class: `AbstractFileUpload`
      Javascript code executed when a file is cleared
      Specified by:
        `getOnclear` in class `AbstractFileUpload`

    - #### setOnclear

          public void setOnclear(String onclear)

    - #### getOnclick

          public String getOnclick()

    - #### setOnclick

          public void setOnclick(String onclick)

    - #### getOncomplete

          public String getOncomplete()

    - #### setOncomplete

          public void setOncomplete(String oncomplete)

    - #### getOndblclick

          public String getOndblclick()

    - #### setOndblclick

          public void setOndblclick(String ondblclick)

    - #### getOnfileselect

          public String getOnfileselect()

      Description copied from class: `AbstractFileUpload`
      Javascript code executed when a file is selected
      Specified by:
        `getOnfileselect` in class `AbstractFileUpload`

    - #### setOnfileselect

          public void setOnfileselect(String onfileselect)

    - #### getOnfilesubmit

          public String getOnfilesubmit()

      Description copied from class: `AbstractFileUpload`
      Javascript code executed when a file is submitted
      Specified by:
        `getOnfilesubmit` in class `AbstractFileUpload`

    - #### setOnfilesubmit

          public void setOnfilesubmit(String onfilesubmit)

    - #### getOnkeydown

          public String getOnkeydown()

    - #### setOnkeydown

          public void setOnkeydown(String onkeydown)

    - #### getOnkeypress

          public String getOnkeypress()

    - #### setOnkeypress

          public void setOnkeypress(String onkeypress)

    - #### getOnkeyup

          public String getOnkeyup()

    - #### setOnkeyup

          public void setOnkeyup(String onkeyup)

    - #### getOnmousedown

          public String getOnmousedown()

    - #### setOnmousedown

          public void setOnmousedown(String onmousedown)

    - #### getOnmousemove

          public String getOnmousemove()

    - #### setOnmousemove

          public void setOnmousemove(String onmousemove)

    - #### getOnmouseout

          public String getOnmouseout()

    - #### setOnmouseout

          public void setOnmouseout(String onmouseout)

    - #### getOnmouseover

          public String getOnmouseover()

    - #### setOnmouseover

          public void setOnmouseover(String onmouseover)

    - #### getOnmouseup

          public String getOnmouseup()

    - #### setOnmouseup

          public void setOnmouseup(String onmouseup)

    - #### getOntyperejected

          public String getOntyperejected()

      Description copied from class: `AbstractFileUpload`
      Javascript code executed when a file does not meet the conditions stated by acceptedTypes parameter.
      Specified by:
        `getOntyperejected` in class `AbstractFileUpload`

    - #### setOntyperejected

          public void setOntyperejected(String ontyperejected)

    - #### getOnuploadcomplete

          public String getOnuploadcomplete()

      Description copied from class: `AbstractFileUpload`
      Javascript code executed when a file upload is complete
      Specified by:
        `getOnuploadcomplete` in class `AbstractFileUpload`

    - #### setOnuploadcomplete

          public void setOnuploadcomplete(String onuploadcomplete)

    - #### getRender

          public Object getRender()

    - #### setRender

          public void setRender(Object render)

    - #### getServerErrorLabel

          public String getServerErrorLabel()

      Description copied from class: `AbstractFileUpload`
      The label displayed when a file upload fails due to a server error.
      Specified by:
        `getServerErrorLabel` in class `AbstractFileUpload`

    - #### setServerErrorLabel

          public void setServerErrorLabel(String serverErrorLabel)

    - #### getSizeExceededLabel

          public String getSizeExceededLabel()

      Description copied from class: `AbstractFileUpload`
      The label displayed when a file exceeds the size limit.
      Specified by:
        `getSizeExceededLabel` in class `AbstractFileUpload`

    - #### setSizeExceededLabel

          public void setSizeExceededLabel(String sizeExceededLabel)

    - #### getStatus

          public String getStatus()

    - #### setStatus

          public void setStatus(String status)

    - #### getStyle

          public String getStyle()

    - #### setStyle

          public void setStyle(String style)

    - #### getStyleClass

          public String getStyleClass()

    - #### setStyleClass

          public void setStyleClass(String styleClass)

    - #### getTitle

          public String getTitle()

    - #### setTitle

          public void setTitle(String title)

    - #### getUploadLabel

          public String getUploadLabel()

      Description copied from class: `AbstractFileUpload`
      The label for the Add button.
      Specified by:
        `getUploadLabel` in class `AbstractFileUpload`

    - #### setUploadLabel

          public void setUploadLabel(String uploadLabel)

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.