org.nuxeo.ecm.platform.ui.web.component.file
Class UIInputFile
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
javax.faces.component.UIInput
org.nuxeo.ecm.platform.ui.web.component.file.UIInputFile
- All Implemented Interfaces:
- javax.faces.component.EditableValueHolder, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder
public class UIInputFile
- extends javax.faces.component.UIInput
- implements javax.faces.component.NamingContainer
UIInput file that handles complex validation.
Attribute value is the file to be uploaded. Its submitted value as well as
filename are handled by sub components. Rendering and validation of
subcomponents are handled here.
- Author:
- Anahide Tchertchian
Fields inherited from class javax.faces.component.UIInput |
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID |
Fields inherited from interface javax.faces.component.NamingContainer |
SEPARATOR_CHAR |
Methods inherited from class javax.faces.component.UIInput |
addValidator, addValueChangeListener, getConverterMessage, getFamily, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener |
Methods inherited from class javax.faces.component.UIOutput |
getConverter, getLocalValue, setConverter |
Methods inherited from class javax.faces.component.UIComponentBase |
broadcast, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class javax.faces.component.UIComponent |
encodeAll, getContainerClientId, getValueExpression, setValueExpression |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.faces.component.ValueHolder |
getConverter, getLocalValue, setConverter |
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
COMPONENT_FAMILY
public static final java.lang.String COMPONENT_FAMILY
- See Also:
- Constant Field Values
UIInputFile
public UIInputFile()
getRendererType
public java.lang.String getRendererType()
- Overrides:
getRendererType
in class javax.faces.component.UIComponentBase
getValue
public java.lang.Object getValue()
- Override value so that an
InputFileInfo
structure is given
instead of the "value" attribute resolution.
- Specified by:
getValue
in interface javax.faces.component.ValueHolder
- Overrides:
getValue
in class javax.faces.component.UIOutput
getFilename
public java.lang.String getFilename()
setFilename
public void setFilename(java.lang.String filename)
getEditFilename
public java.lang.Boolean getEditFilename()
setEditFilename
public void setEditFilename(java.lang.Boolean editFilename)
getFileInfoValue
public InputFileInfo getFileInfoValue()
getFileInfoLocalValue
public InputFileInfo getFileInfoLocalValue()
getFileInfoSubmittedValue
public InputFileInfo getFileInfoSubmittedValue()
getOnchange
public java.lang.String getOnchange()
setOnchange
public void setOnchange(java.lang.String onchange)
getOnclick
public java.lang.String getOnclick()
setOnclick
public void setOnclick(java.lang.String onclick)
getOnselect
public java.lang.String getOnselect()
setOnselect
public void setOnselect(java.lang.String onselect)
decode
public void decode(javax.faces.context.FacesContext context)
- Overrides:
decode
in class javax.faces.component.UIInput
validate
public void validate(javax.faces.context.FacesContext context)
- Process validation. Sub components are already validated.
- Overrides:
validate
in class javax.faces.component.UIInput
validateFilename
public void validateFilename(javax.faces.context.FacesContext context,
InputFileInfo submitted)
validateBlob
public void validateBlob(javax.faces.context.FacesContext context,
InputFileInfo submitted)
throws javax.faces.validator.ValidatorException
- Validates submitted blob.
Throws ValidatorException as a flag when blob is null and file is not
required to set choice back to "no file" (see NXP-1732).
- Throws:
javax.faces.validator.ValidatorException
updateFilename
public void updateFilename(javax.faces.context.FacesContext context,
java.lang.String newFilename)
updateModel
public void updateModel(javax.faces.context.FacesContext context)
- Overrides:
updateModel
in class javax.faces.component.UIInput
getCurrentBlob
public Blob getCurrentBlob()
getCurrentFilename
public java.lang.String getCurrentFilename()
encodeBegin
public void encodeBegin(javax.faces.context.FacesContext context)
throws java.io.IOException
- Overrides:
encodeBegin
in class javax.faces.component.UIComponentBase
- Throws:
java.io.IOException
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState
in interface javax.faces.component.StateHolder
- Overrides:
saveState
in class javax.faces.component.UIInput
restoreState
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
- Specified by:
restoreState
in interface javax.faces.component.StateHolder
- Overrides:
restoreState
in class javax.faces.component.UIInput
Copyright © 2010 Nuxeo SAS. All Rights Reserved.