|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
javax.faces.component.UIInput
javax.faces.component.html.HtmlInputText
org.apache.myfaces.custom.fileupload.AbstractHtmlInputFileUpload
public abstract class AbstractHtmlInputFileUpload
Creates a file-selection widget in the rendered page which allows a user to select a file for uploading to the server.
When the page is selected (using a command component such as commandButton), the currently selected file contents are included in the data posted to the server. The contents are cached somewhere, and an object of type UploadedFile will then be assigned to the property pointed to by the "value" expression of this component.
You must enable the Tomahawk ExtensionsFilter to make this component work (see web.xml).
Also, don't forget to set the form's attribute "enctype" to "multipart/form-data". See "examples/web/fileupload.jsp" for an example!
Unless otherwise specified, all attributes accept static values or EL expressions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.faces.component.html.HtmlInputText |
---|
javax.faces.component.html.HtmlInputText.PropertyKeys |
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_TYPE
|
static java.lang.String |
DEFAULT_RENDERER_TYPE
|
static java.lang.String |
SIZE_LIMIT_MESSAGE_ID
|
Fields inherited from class javax.faces.component.html.HtmlInputText |
---|
COMPONENT_FAMILY |
Fields inherited from class javax.faces.component.UIInput |
---|
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME |
Fields inherited from class javax.faces.component.UIComponent |
---|
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY |
Fields inherited from interface org.apache.myfaces.component.UserRoleAware |
---|
ENABLED_ON_USER_ROLE_ATTR, VISIBLE_ON_USER_ROLE_ATTR |
Constructor Summary | |
---|---|
AbstractHtmlInputFileUpload()
|
Method Summary | |
---|---|
abstract java.lang.String |
getAccept()
This attribute specifies a comma-separated list of content types that a server processing this form will handle correctly. |
abstract java.lang.String |
getStorage()
This setting was intended to allow control over how the contents of the file get temporarily stored during processing. |
UploadedFile |
getUploadedFile()
|
java.lang.Object |
getValue()
An EL expression to which an UploadedFile object will be assigned on postback if the user specified a file to upload to the server. |
boolean |
isRendered()
|
void |
setUploadedFile(UploadedFile upFile)
|
protected void |
validateValue(javax.faces.context.FacesContext context,
java.lang.Object convertedValue)
|
Methods inherited from class javax.faces.component.html.HtmlInputText |
---|
getAccesskey, getAlt, getAutocomplete, getDefaultEventName, getDir, getEventNames, getFamily, getLabel, getLang, getMaxlength, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getSize, getStyle, getStyleClass, getTabindex, getTitle, isDisabled, isReadonly, setAccesskey, setAlt, setAutocomplete, setDir, setDisabled, setLabel, setLang, setMaxlength, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setSize, setStyle, setStyleClass, setTabindex, setTitle |
Methods inherited from class javax.faces.component.UIInput |
---|
addValidator, addValueChangeListener, broadcast, clearInitialState, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isEmpty, isImmediate, isLocalValueSet, isRequired, isValid, markInitialState, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate |
Methods inherited from class javax.faces.component.UIOutput |
---|
getConverter, getLocalValue, setConverter |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
addClientBehavior, addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.myfaces.component.UserRoleAware |
---|
getEnabledOnUserRole, getVisibleOnUserRole, setEnabledOnUserRole, setVisibleOnUserRole |
Methods inherited from interface org.apache.myfaces.component.AlignProperty |
---|
getAlign |
Methods inherited from interface javax.faces.component.behavior.ClientBehaviorHolder |
---|
addClientBehavior, getClientBehaviors |
Methods inherited from interface javax.faces.component.ValueHolder |
---|
getConverter, getLocalValue, setConverter |
Field Detail |
---|
public static final java.lang.String COMPONENT_TYPE
public static final java.lang.String DEFAULT_RENDERER_TYPE
public static final java.lang.String SIZE_LIMIT_MESSAGE_ID
Constructor Detail |
---|
public AbstractHtmlInputFileUpload()
Method Detail |
---|
public void setUploadedFile(UploadedFile upFile)
public UploadedFile getUploadedFile()
public abstract java.lang.String getStorage()
It allows three options
public abstract java.lang.String getAccept()
public java.lang.Object getValue()
getValue
in interface javax.faces.component.ValueHolder
getValue
in class javax.faces.component.UIInput
public boolean isRendered()
isRendered
in class javax.faces.component.UIComponentBase
protected void validateValue(javax.faces.context.FacesContext context, java.lang.Object convertedValue)
validateValue
in class javax.faces.component.UIInput
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |