Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces UI Components UI 4.2.1.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.component
Class AbstractFileUpload

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

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

Direct Known Subclasses:
  UIFileUpload

    public abstract class AbstractFileUpload

extends javax.faces.component.UIComponentBase

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

Field Summary
`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
`AbstractFileUpload()`

Method Summary
`void` | `addFileUploadListener(org.richfaces.event.FileUploadListener listener)` Add a new `FileUploadListener` to the set of listeners interested in being notified when `org.richfaces.FileUploadEvent`s occur.
`abstract String` | `getAcceptedTypes()` Defines comma separated list of file extensions accepted by component.
`abstract String` | `getAddLabel()` The label for the Add button.
`abstract String` | `getClearAllLabel()` The label for the Clear button.
`abstract String` | `getClearLabel()` The label displayed for the Clear link
`abstract String` | `getDeleteLabel()` The label displayed for the Delete link
`abstract String` | `getDoneLabel()` The label displayed when a file is successfully uploaded.
`org.richfaces.event.FileUploadListener[]` | `getFileUploadListeners()` Return the set of registered `FileUploadListener`s for this `AbstractFileUpload` instance.
`abstract String` | `getListHeight()` Defines height of file list.
`abstract String` | `getMaxFilesQuantity()` Defines maximum number of files allowed to be uploaded.
`abstract String` | `getOnclear()` Javascript code executed when a file is cleared
`abstract String` | `getOnfilesubmit()` Javascript code executed when a file is submitted
`abstract String` | `getOntyperejected()` Javascript code executed when a file does not meet the conditions stated by acceptedTypes parameter.
`abstract String` | `getOnuploadcomplete()` Javascript code executed when a file upload is complete
`abstract String` | `getServerErrorLabel()` The label displayed when a file upload fails due to a server error.
`abstract String` | `getSizeExceededLabel()` The label displayed when a file exceeds the size limit.
`abstract String` | `getUploadLabel()` The label for the Add button.
`abstract boolean` | `isDisabled()` If "true", this component is disabled
`abstract boolean` | `isNoDuplicate()` If "true" duplicate file uploads are prevented
`void` | `processEvent(javax.faces.event.ComponentSystemEvent event)`
`void` | `removeFileUploadListener(org.richfaces.event.FileUploadListener listener)` Remove an existing `FileUploadListener` (if any) from the set of listeners interested in being notified when `FileUploadListener`s occur.

Methods inherited from class javax.faces.component.UIComponentBase
`addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, 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, getFamily, 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`

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

### AbstractFileUpload

    public AbstractFileUpload()

Method Detail

### getAcceptedTypes

    public abstract String getAcceptedTypes()

  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.

### getMaxFilesQuantity

    public abstract String getMaxFilesQuantity()

  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

### isDisabled

    public abstract boolean isDisabled()

  If "true", this component is disabled

### isNoDuplicate

    public abstract boolean isNoDuplicate()

  If "true" duplicate file uploads are prevented

  Default is "false"

### getOnfilesubmit

    public abstract String getOnfilesubmit()

  Javascript code executed when a file is submitted

### getOntyperejected

    public abstract String getOntyperejected()

  Javascript code executed when a file does not meet the conditions stated by acceptedTypes parameter.

### getOnuploadcomplete

    public abstract String getOnuploadcomplete()

  Javascript code executed when a file upload is complete

### getOnclear

    public abstract String getOnclear()

  Javascript code executed when a file is cleared

### getAddLabel

    public abstract String getAddLabel()

  The label for the Add button.

### getUploadLabel

    public abstract String getUploadLabel()

  The label for the Add button.

### getClearAllLabel

    public abstract String getClearAllLabel()

  The label for the Clear button.

### getDoneLabel

    public abstract String getDoneLabel()

  The label displayed when a file is successfully uploaded.

### getSizeExceededLabel

    public abstract String getSizeExceededLabel()

  The label displayed when a file exceeds the size limit.

### getServerErrorLabel

    public abstract String getServerErrorLabel()

  The label displayed when a file upload fails due to a server error.

### getClearLabel

    public abstract String getClearLabel()

  The label displayed for the Clear link

### getDeleteLabel

    public abstract String getDeleteLabel()

  The label displayed for the Delete link

### getListHeight

    public abstract String getListHeight()

  Defines height of file list.

  Default value is "210px".

### processEvent

    public void processEvent(javax.faces.event.ComponentSystemEvent event)
                      throws javax.faces.event.AbortProcessingException

  Specified by:
    `processEvent` in interface `javax.faces.event.ComponentSystemEventListener`
  Overrides:
    `processEvent` in class `javax.faces.component.UIComponent`
  Throws:
    `javax.faces.event.AbortProcessingException`

### addFileUploadListener

    public void addFileUploadListener(org.richfaces.event.FileUploadListener listener)

  Add a new `FileUploadListener` to the set of listeners interested in being notified when `org.richfaces.FileUploadEvent`s occur.

  Parameters:
    `listener` - The `FileUploadListener` to be added
  Throws:
    `NullPointerException` - if `listener` is `null`

### getFileUploadListeners

    public org.richfaces.event.FileUploadListener[] getFileUploadListeners()

  Return the set of registered `FileUploadListener`s for this `AbstractFileUpload` instance. If there are no registered listeners, a zero-length array is returned.

### removeFileUploadListener

    public void removeFileUploadListener(org.richfaces.event.FileUploadListener listener)

  Remove an existing `FileUploadListener` (if any) from the set of listeners interested in being notified when `FileUploadListener`s occur.

  Parameters:
    `listener` - The `FileUploadListener` to be removed
  Throws:
    `NullPointerException` - if `listener` is `null`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| RichFaces UI Components UI 4.2.1.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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