org.jboss.seam.ui.component.html
Class HtmlFileUpload

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by org.jboss.seam.ui.component.UIFileUpload
                      extended by org.jboss.seam.ui.component.html.HtmlFileUpload
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class HtmlFileUpload
extends UIFileUpload

Component-Type org.jboss.seam.ui.FileUpload Component-Family org.jboss.seam.ui.FileUpload Renderer-Type org.jboss.seam.ui.FileUploadRenderer Renders a file upload control. This control must be used within a form with an encoding type of multipart/form-data, i.e: <h:form enctype="multipart/form-data"> For multipart requests, the Seam Multipart servlet filter must also be configured in web.xml: <filter> <filter-name>Seam Filter</filter-name> <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class> </filter> <filter-mapping> <filter-name>Seam Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> The following configuration options for multipart requests may be configured in components.xml: createTempFiles - if this option is set to true, uploaded files are streamed to a temporary file instead of in memory. maxRequestSize - the maximum size of a file upload request, in bytes. Here's an example: <component class="org.jboss.seam.servlet.MultipartConfig"> <property name="createTempFiles">true</property> <property name="maxRequestSize">1000000</property> </component>


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
HtmlFileUpload()
          Constructor to init default renderers
 
Method Summary
 java.lang.String getAccept()
          a comma-separated list of content types to accept, may not be supported by the browser.
 java.lang.String getAccesskey()
          This attribute assigns an access key to an element.
 java.lang.String getAlign()
          left|center|right|justify [CI] Deprecated.
 java.lang.String getAlt()
          For a user agents that cannot display images, forms, or applets, this attribute specifies alternate text.
 java.lang.String getContentType()
          the property to receive the contentType Getter for contentType
 java.lang.Object getData()
          this value binding receives the file's content type (optional).
 java.lang.String getFamily()
           
 java.lang.String getFileName()
          this value binding receives the filename (optional).
 java.lang.Integer getFileSize()
          this value binding receives the file size (optional).
 int getMaxlength()
          When the type attribute has the value "text" or "password", this attribute specifies the maximum number of characters the user may enter.
 java.lang.String getOnblur()
          HTML: script expression; the element lost the focus Getter for onblur
 java.lang.String getOnchange()
          HTML: script expression; the element value was changed Getter for onchange
 java.lang.String getOnclick()
          HTML: a script expression; a pointer button is clicked Getter for onclick
 java.lang.String getOndblclick()
          HTML: a script expression; a pointer button is double-clicked Getter for ondblclick
 java.lang.String getOnfocus()
          HTML: script expression; the element got the focus Getter for onfocus
 java.lang.String getOnkeydown()
          HTML: a script expression; a key is pressed down Getter for onkeydown
 java.lang.String getOnkeypress()
          HTML: a script expression; a key is pressed and released Getter for onkeypress
 java.lang.String getOnkeyup()
          HTML: a script expression; a key is released Getter for onkeyup
 java.lang.String getOnmousedown()
          HTML: script expression; a pointer button is pressed down Getter for onmousedown
 java.lang.String getOnmousemove()
          HTML: a script expression; a pointer is moved within Getter for onmousemove
 java.lang.String getOnmouseout()
          HTML: a script expression; a pointer is moved away Getter for onmouseout
 java.lang.String getOnmouseover()
          HTML: a script expression; a pointer is moved onto Getter for onmouseover
 java.lang.String getOnmouseup()
          HTML: script expression; a pointer button is released Getter for onmouseup
 java.lang.String getOnselect()
          HTML: script expression; The onselect event occurs when a user selects some text in a text field.
 int getSize()
          This attribute tells the user agent the initial width of the control.
 java.lang.String getStyle()
          CSS style(s) is/are to be applied when this component is rendered Getter for style
 java.lang.String getStyleClass()
          Corresponds to the HTML class attribute Getter for styleClass
 java.lang.String getTabindex()
          This attribute specifies the position of the current element in the tabbing order for the current document.
 boolean isDisabled()
          When set for a form control, this boolean attribute disables the control for user input Getter for disabled
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setAccept(java.lang.String __accept)
          a comma-separated list of content types to accept, may not be supported by the browser.
 void setAccesskey(java.lang.String __accesskey)
          This attribute assigns an access key to an element.
 void setAlign(java.lang.String __align)
          left|center|right|justify [CI] Deprecated.
 void setAlt(java.lang.String __alt)
          For a user agents that cannot display images, forms, or applets, this attribute specifies alternate text.
 void setContentType(java.lang.String __contentType)
          the property to receive the contentType Setter for contentType
 void setData(java.lang.Object __data)
          this value binding receives the file's content type (optional).
 void setDisabled(boolean __disabled)
          When set for a form control, this boolean attribute disables the control for user input Setter for disabled
 void setFileName(java.lang.String __fileName)
          this value binding receives the filename (optional).
 void setFileSize(java.lang.Integer __fileSize)
          this value binding receives the file size (optional).
 void setMaxlength(int __maxlength)
          When the type attribute has the value "text" or "password", this attribute specifies the maximum number of characters the user may enter.
 void setOnblur(java.lang.String __onblur)
          HTML: script expression; the element lost the focus Setter for onblur
 void setOnchange(java.lang.String __onchange)
          HTML: script expression; the element value was changed Setter for onchange
 void setOnclick(java.lang.String __onclick)
          HTML: a script expression; a pointer button is clicked Setter for onclick
 void setOndblclick(java.lang.String __ondblclick)
          HTML: a script expression; a pointer button is double-clicked Setter for ondblclick
 void setOnfocus(java.lang.String __onfocus)
          HTML: script expression; the element got the focus Setter for onfocus
 void setOnkeydown(java.lang.String __onkeydown)
          HTML: a script expression; a key is pressed down Setter for onkeydown
 void setOnkeypress(java.lang.String __onkeypress)
          HTML: a script expression; a key is pressed and released Setter for onkeypress
 void setOnkeyup(java.lang.String __onkeyup)
          HTML: a script expression; a key is released Setter for onkeyup
 void setOnmousedown(java.lang.String __onmousedown)
          HTML: script expression; a pointer button is pressed down Setter for onmousedown
 void setOnmousemove(java.lang.String __onmousemove)
          HTML: a script expression; a pointer is moved within Setter for onmousemove
 void setOnmouseout(java.lang.String __onmouseout)
          HTML: a script expression; a pointer is moved away Setter for onmouseout
 void setOnmouseover(java.lang.String __onmouseover)
          HTML: a script expression; a pointer is moved onto Setter for onmouseover
 void setOnmouseup(java.lang.String __onmouseup)
          HTML: script expression; a pointer button is released Setter for onmouseup
 void setOnselect(java.lang.String __onselect)
          HTML: script expression; The onselect event occurs when a user selects some text in a text field.
 void setSize(int __size)
          This attribute tells the user agent the initial width of the control.
 void setStyle(java.lang.String __style)
          CSS style(s) is/are to be applied when this component is rendered Setter for style
 void setStyleClass(java.lang.String __styleClass)
          Corresponds to the HTML class attribute Setter for styleClass
 void setTabindex(java.lang.String __tabindex)
          This attribute specifies the position of the current element in the tabbing order for the current document.
 
Methods inherited from class org.jboss.seam.ui.component.UIFileUpload
getLocalContentType, getLocalFileName, getLocalFileSize, getLocalInputStream, processUpdates, setLocalContentType, setLocalFileName, setLocalFileSize, setLocalInputStream
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, compareValues, decode, getConvertedValue, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processValidators, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, getValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

HtmlFileUpload

public HtmlFileUpload()
Constructor to init default renderers

Method Detail

setAccept

public void setAccept(java.lang.String __accept)
a comma-separated list of content types to accept, may not be supported by the browser. E.g. "images/png,images/jpg", "images/*". Setter for accept

Specified by:
setAccept in class UIFileUpload
Parameters:
accept - - new value

getAccept

public java.lang.String getAccept()
a comma-separated list of content types to accept, may not be supported by the browser. E.g. "images/png,images/jpg", "images/*". Getter for accept

Specified by:
getAccept in class UIFileUpload
Returns:
accept value from local variable or value bindings

setAccesskey

public void setAccesskey(java.lang.String __accesskey)
This attribute assigns an access key to an element. An access key is a single character from the document character set. Note: Authors should consider the input method of the expected reader when specifying an accesskey Setter for accesskey

Parameters:
accesskey - - new value

getAccesskey

public java.lang.String getAccesskey()
This attribute assigns an access key to an element. An access key is a single character from the document character set. Note: Authors should consider the input method of the expected reader when specifying an accesskey Getter for accesskey

Returns:
accesskey value from local variable or value bindings

setAlign

public void setAlign(java.lang.String __align)
left|center|right|justify [CI] Deprecated. This attribute specifies the horizontal alignment of its element with respect to the surrounding context. Possible values: left: text lines are rendered flush left. center: text lines are centered. right: text lines are rendered flush right. justify: text lines are justified to both margins. The default depends on the base text direction. For left to right text, the default is align=left, while for right to left text, the default is align=right Setter for align

Parameters:
align - - new value

getAlign

public java.lang.String getAlign()
left|center|right|justify [CI] Deprecated. This attribute specifies the horizontal alignment of its element with respect to the surrounding context. Possible values: left: text lines are rendered flush left. center: text lines are centered. right: text lines are rendered flush right. justify: text lines are justified to both margins. The default depends on the base text direction. For left to right text, the default is align=left, while for right to left text, the default is align=right Getter for align

Returns:
align value from local variable or value bindings

setAlt

public void setAlt(java.lang.String __alt)
For a user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute Setter for alt

Parameters:
alt - - new value

getAlt

public java.lang.String getAlt()
For a user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute Getter for alt

Returns:
alt value from local variable or value bindings

setContentType

public void setContentType(java.lang.String __contentType)
the property to receive the contentType Setter for contentType

Parameters:
contentType - - new value

getContentType

public java.lang.String getContentType()
the property to receive the contentType Getter for contentType

Returns:
contentType value from local variable or value bindings

setData

public void setData(java.lang.Object __data)
this value binding receives the file's content type (optional). Setter for data

Parameters:
data - - new value

getData

public java.lang.Object getData()
this value binding receives the file's content type (optional). Getter for data

Returns:
data value from local variable or value bindings

setDisabled

public void setDisabled(boolean __disabled)
When set for a form control, this boolean attribute disables the control for user input Setter for disabled

Parameters:
disabled - - new value

isDisabled

public boolean isDisabled()
When set for a form control, this boolean attribute disables the control for user input Getter for disabled

Returns:
disabled value from local variable or value bindings

setFileName

public void setFileName(java.lang.String __fileName)
this value binding receives the filename (optional). Setter for fileName

Parameters:
fileName - - new value

getFileName

public java.lang.String getFileName()
this value binding receives the filename (optional). Getter for fileName

Returns:
fileName value from local variable or value bindings

setFileSize

public void setFileSize(java.lang.Integer __fileSize)
this value binding receives the file size (optional). Setter for fileSize

Parameters:
fileSize - - new value

getFileSize

public java.lang.Integer getFileSize()
this value binding receives the file size (optional). Getter for fileSize

Returns:
fileSize value from local variable or value bindings

setMaxlength

public void setMaxlength(int __maxlength)
When the type attribute has the value "text" or "password", this attribute specifies the maximum number of characters the user may enter. This number may exceed the specified size, in which case the user agent should offer a scrolling mechanism. The default value for this attribute is an unlimited number Setter for maxlength

Parameters:
maxlength - - new value

getMaxlength

public int getMaxlength()
When the type attribute has the value "text" or "password", this attribute specifies the maximum number of characters the user may enter. This number may exceed the specified size, in which case the user agent should offer a scrolling mechanism. The default value for this attribute is an unlimited number Getter for maxlength

Returns:
maxlength value from local variable or value bindings

setOnblur

public void setOnblur(java.lang.String __onblur)
HTML: script expression; the element lost the focus Setter for onblur

Parameters:
onblur - - new value

getOnblur

public java.lang.String getOnblur()
HTML: script expression; the element lost the focus Getter for onblur

Returns:
onblur value from local variable or value bindings

setOnchange

public void setOnchange(java.lang.String __onchange)
HTML: script expression; the element value was changed Setter for onchange

Parameters:
onchange - - new value

getOnchange

public java.lang.String getOnchange()
HTML: script expression; the element value was changed Getter for onchange

Returns:
onchange value from local variable or value bindings

setOnclick

public void setOnclick(java.lang.String __onclick)
HTML: a script expression; a pointer button is clicked Setter for onclick

Parameters:
onclick - - new value

getOnclick

public java.lang.String getOnclick()
HTML: a script expression; a pointer button is clicked Getter for onclick

Returns:
onclick value from local variable or value bindings

setOndblclick

public void setOndblclick(java.lang.String __ondblclick)
HTML: a script expression; a pointer button is double-clicked Setter for ondblclick

Parameters:
ondblclick - - new value

getOndblclick

public java.lang.String getOndblclick()
HTML: a script expression; a pointer button is double-clicked Getter for ondblclick

Returns:
ondblclick value from local variable or value bindings

setOnfocus

public void setOnfocus(java.lang.String __onfocus)
HTML: script expression; the element got the focus Setter for onfocus

Parameters:
onfocus - - new value

getOnfocus

public java.lang.String getOnfocus()
HTML: script expression; the element got the focus Getter for onfocus

Returns:
onfocus value from local variable or value bindings

setOnkeydown

public void setOnkeydown(java.lang.String __onkeydown)
HTML: a script expression; a key is pressed down Setter for onkeydown

Parameters:
onkeydown - - new value

getOnkeydown

public java.lang.String getOnkeydown()
HTML: a script expression; a key is pressed down Getter for onkeydown

Returns:
onkeydown value from local variable or value bindings

setOnkeypress

public void setOnkeypress(java.lang.String __onkeypress)
HTML: a script expression; a key is pressed and released Setter for onkeypress

Parameters:
onkeypress - - new value

getOnkeypress

public java.lang.String getOnkeypress()
HTML: a script expression; a key is pressed and released Getter for onkeypress

Returns:
onkeypress value from local variable or value bindings

setOnkeyup

public void setOnkeyup(java.lang.String __onkeyup)
HTML: a script expression; a key is released Setter for onkeyup

Parameters:
onkeyup - - new value

getOnkeyup

public java.lang.String getOnkeyup()
HTML: a script expression; a key is released Getter for onkeyup

Returns:
onkeyup value from local variable or value bindings

setOnmousedown

public void setOnmousedown(java.lang.String __onmousedown)
HTML: script expression; a pointer button is pressed down Setter for onmousedown

Parameters:
onmousedown - - new value

getOnmousedown

public java.lang.String getOnmousedown()
HTML: script expression; a pointer button is pressed down Getter for onmousedown

Returns:
onmousedown value from local variable or value bindings

setOnmousemove

public void setOnmousemove(java.lang.String __onmousemove)
HTML: a script expression; a pointer is moved within Setter for onmousemove

Parameters:
onmousemove - - new value

getOnmousemove

public java.lang.String getOnmousemove()
HTML: a script expression; a pointer is moved within Getter for onmousemove

Returns:
onmousemove value from local variable or value bindings

setOnmouseout

public void setOnmouseout(java.lang.String __onmouseout)
HTML: a script expression; a pointer is moved away Setter for onmouseout

Parameters:
onmouseout - - new value

getOnmouseout

public java.lang.String getOnmouseout()
HTML: a script expression; a pointer is moved away Getter for onmouseout

Returns:
onmouseout value from local variable or value bindings

setOnmouseover

public void setOnmouseover(java.lang.String __onmouseover)
HTML: a script expression; a pointer is moved onto Setter for onmouseover

Parameters:
onmouseover - - new value

getOnmouseover

public java.lang.String getOnmouseover()
HTML: a script expression; a pointer is moved onto Getter for onmouseover

Returns:
onmouseover value from local variable or value bindings

setOnmouseup

public void setOnmouseup(java.lang.String __onmouseup)
HTML: script expression; a pointer button is released Setter for onmouseup

Parameters:
onmouseup - - new value

getOnmouseup

public java.lang.String getOnmouseup()
HTML: script expression; a pointer button is released Getter for onmouseup

Returns:
onmouseup value from local variable or value bindings

setOnselect

public void setOnselect(java.lang.String __onselect)
HTML: script expression; The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements Setter for onselect

Parameters:
onselect - - new value

getOnselect

public java.lang.String getOnselect()
HTML: script expression; The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements Getter for onselect

Returns:
onselect value from local variable or value bindings

setSize

public void setSize(int __size)
This attribute tells the user agent the initial width of the control. The width is given in pixels except when type attribute has the value "text" or "password". In that case, its value refers to the (integer) number of characters Setter for size

Parameters:
size - - new value

getSize

public int getSize()
This attribute tells the user agent the initial width of the control. The width is given in pixels except when type attribute has the value "text" or "password". In that case, its value refers to the (integer) number of characters Getter for size

Returns:
size value from local variable or value bindings

setStyle

public void setStyle(java.lang.String __style)
CSS style(s) is/are to be applied when this component is rendered Setter for style

Specified by:
setStyle in class UIFileUpload
Parameters:
style - - new value

getStyle

public java.lang.String getStyle()
CSS style(s) is/are to be applied when this component is rendered Getter for style

Specified by:
getStyle in class UIFileUpload
Returns:
style value from local variable or value bindings

setStyleClass

public void setStyleClass(java.lang.String __styleClass)
Corresponds to the HTML class attribute Setter for styleClass

Specified by:
setStyleClass in class UIFileUpload
Parameters:
styleClass - - new value

getStyleClass

public java.lang.String getStyleClass()
Corresponds to the HTML class attribute Getter for styleClass

Specified by:
getStyleClass in class UIFileUpload
Returns:
styleClass value from local variable or value bindings

setTabindex

public void setTabindex(java.lang.String __tabindex)
This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros Setter for tabindex

Parameters:
tabindex - - new value

getTabindex

public java.lang.String getTabindex()
This attribute specifies the position of the current element in the tabbing order for the current document. This value must be a number between 0 and 32767. User agents should ignore leading zeros Getter for tabindex

Returns:
tabindex value from local variable or value bindings

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UIInput

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 © 2008. All Rights Reserved.