Class Hierarchy All Classes All Fields and Methods
Class com.ibm.faces.component.UIFileupload
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase javax.faces.component.UIOutput javax.faces.component.UIInput com.ibm.faces.component.UIFileuploadpublic class UIFileupload
extends UIInputUIFileupload is a UIComponent that allows the client to upload a file to the server. The HTML form that the component is used on must be encoded with "multipart/form-data".
Tags:
Renderers: FileuploadRenderer
- See Also
Field Index Field Description COMPONENT_FAMILY The standard component family for this component. IAE_MSG VALUE_REF_BYTE_ARRAY VALUE_REF_STREAM VALUE_REF_STRING
Constructor Index Constructor Description UIFileupload()
Method Index Method Description String getComponentType() Returns component type. String getFamily() String getFilename() String getMimetype() boolean getRendersChildren() Returns a flag indicating whether this component is responsible for rendering its child components. Object getValue() Returns value. void setFilename(String) Setter for the filename property void setMimetype(String) Setter for the mimetype property void setValue(Object) Sets value. void updateModel(FacesContext) Updates the model data associated with this component.
Fields
COMPONENT_FAMILY
public static final java.lang.String COMPONENT_FAMILY
The standard component family for this component.
IAE_MSG
public static final java.lang.String IAE_MSG
VALUE_REF_BYTE_ARRAY
public static final int VALUE_REF_BYTE_ARRAY
VALUE_REF_STREAM
public static final int VALUE_REF_STREAM
VALUE_REF_STRING
public static final int VALUE_REF_STRING
Constructors
UIFileupload
public UIFileupload()
Methods
getComponentType
public String getComponentType()Returns component type.
- Returns
- component type
getFamily
public String getFamily()
getFilename
public String getFilename()
- Returns
- String file name of the uploaded item. This is the name that came from the client including path to the file e.g. c:\temp\readme.txt
getMimetype
public String getMimetype()
- Returns
- String mimetype of the uploaded item
getRendersChildren
public boolean getRendersChildren()Returns a flag indicating whether this component is responsible for rendering its child components.
- Overrides
- getRendersChildren in class UIComponentBase
- See Also
getValue
public Object getValue()Returns value.
- See Also
setFilename
public void setFilename(String string)Setter for the filename property
- Parameters
- string - represents filename of the uploaded item
setMimetype
public void setMimetype(String string)Setter for the mimetype property
- Parameters
- string - mimetype of the uploaded item
setValue
public void setValue(Object valueRef)Sets value.
- See Also
updateModel
public void updateModel(FacesContext context)Updates the model data associated with this component.
- Creates a data header block containing filename and mime type, so that the uploaded data can be interpreted later (for example, during download)
- Data processing depends on the type of the object being used to store data (referenced by valueRef attribute)
- If stored as a String, encodes data using base64 encoding
- If stored as a byte array, no further processing is required
- Stores created header and processed data in the model.
- Parameters
- context - FacesContext for the request we are processing
- Throws
- NullPointerException if context is null
- Overrides
- updateModel in class UIInput
- See Also
Class Hierarchy All Classes All Fields and Methods