com.extjs.gxt.ui.client.widget.form
Class FileUploadField

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.BoxComponent
                  extended by com.extjs.gxt.ui.client.widget.form.Field<D>
                      extended by com.extjs.gxt.ui.client.widget.form.TextField<java.lang.String>
                          extended by com.extjs.gxt.ui.client.widget.form.FileUploadField
All Implemented Interfaces:
Observable, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener

public class FileUploadField
extends TextField<java.lang.String>

A file upload filed. When using this field, the containing form panel's encoding must be set to MULTIPART using @link FormPanel.setEncoding(Encoding). In addition, the method should be set to POST using FormPanel.setMethod(com.extjs.gxt.ui.client.widget.form.FormPanel.Method) .


Nested Class Summary
 class FileUploadField.FileUploadFieldMessages
           
 
Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.form.TextField
TextField.TextFieldMessages
 
Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.form.Field
Field.FieldImages, Field.FieldMessages
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
FileUploadField()
          Creates a new file upload field.
 
Method Summary
 com.google.gwt.user.client.ui.AbstractImagePrototype getButtonIconStyle()
          Returns the button icon class.
 int getButtonOffset()
          Returns the button offset.
 com.google.gwt.dom.client.InputElement getFileInput()
          Returns the file input element.
 FileUploadField.FileUploadFieldMessages getMessages()
          Returns the field's messages.
 java.lang.String getName()
          Returns the name attribute of the field if available.
 void onComponentEvent(ComponentEvent ce)
          Any events a component receives will be forwarded to this method.
 void reset()
          Resets the current field value to the originally loaded value and clears any validation messages.
 void setButtonIcon(com.google.gwt.user.client.ui.AbstractImagePrototype buttonIconStyle)
          Sets the button icon class.
 void setButtonOffset(int buttonOffset)
          Sets the number of pixels between the input element and the browser button (defaults to 3).
 void setName(java.lang.String name)
          Sets the field's HTML name attribute.
 void setReadOnly(boolean readOnly)
          Sets the field's read only state.
 
Methods inherited from class com.extjs.gxt.ui.client.widget.form.TextField
getAllowBlank, getCursorPos, getMaxLength, getMinLength, getRegex, getSelectedText, getSelectionLength, getSelectOnFocus, getValidator, isPassword, select, selectAll, setAllowBlank, setCursorPos, setEmptyText, setMaxLength, setMinLength, setPassword, setRegex, setSelectionRange, setSelectOnFocus, setValidator, setValue
 
Methods inherited from class com.extjs.gxt.ui.client.widget.form.Field
addInputStyleName, addKeyListener, clearInvalid, focus, forceInvalid, getAutoValidate, getEmptyText, getErrorMessage, getFieldLabel, getImages, getLabelSeparator, getLabelStyle, getMessageTarget, getOriginalValue, getPropertyEditor, getRawValue, getValidateOnBlur, getValidationDelay, getValue, isDirty, isFireChangeEventOnSetValue, isHideLabel, isInEditor, isReadOnly, isValid, isValid, markInvalid, removeInputStyleName, removeKeyListener, setAutoValidate, setFieldLabel, setFireChangeEventOnSetValue, setHideLabel, setImages, setInEditor, setLabelSeparator, setLabelStyle, setMessages, setMessageTarget, setOriginalValue, setPropertyEditor, setRawValue, setTabIndex, setValidateOnBlur, setValidationDelay, updateOriginalValue, validate, validate
 
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent
getBounds, getHeight, getHeight, getPosition, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize
 
Methods inherited from class com.extjs.gxt.ui.client.widget.Component
addListener, addPlugin, addStyleName, addWidgetListener, clearState, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, getBaseStyle, getBorders, getContextMenu, getData, getElement, getHideMode, getId, getItemId, getListeners, getModel, getState, getStateId, getToolTip, hasListeners, hasListeners, hide, hideToolTip, isDisabledEvents, isEnabled, isRendered, isStateful, isVisible, mask, mask, mask, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeSwallow, removeToolTip, removeWidgetListener, render, render, repaint, saveState, setBorders, setContextMenu, setData, setElement, setEnabled, setHideMode, setId, setIntStyleAttribute, setItemId, setStateful, setStateId, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, setZIndex, show, sinkEvents, swallowEvent, swallowEvent, toString, unmask
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
fireEvent, getParent, isAttached
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileUploadField

public FileUploadField()
Creates a new file upload field.

Method Detail

getButtonIconStyle

public com.google.gwt.user.client.ui.AbstractImagePrototype getButtonIconStyle()
Returns the button icon class.


getButtonOffset

public int getButtonOffset()
Returns the button offset.


getFileInput

public com.google.gwt.dom.client.InputElement getFileInput()
Returns the file input element. You should not store a reference to this. When resetting this field the file input will change.


getMessages

public FileUploadField.FileUploadFieldMessages getMessages()
Description copied from class: Field
Returns the field's messages.

Overrides:
getMessages in class TextField<java.lang.String>
Returns:
the messages

getName

public java.lang.String getName()
Description copied from class: Field
Returns the name attribute of the field if available.

Overrides:
getName in class Field<java.lang.String>
Returns:
the field name

onComponentEvent

public void onComponentEvent(ComponentEvent ce)
Description copied from class: Component
Any events a component receives will be forwarded to this method. Subclasses should override as needed. The Component.onBrowserEvent(com.google.gwt.user.client.Event) method should not be overridden or modified.

Overrides:
onComponentEvent in class Field<java.lang.String>
Parameters:
ce - the base event

reset

public void reset()
Description copied from class: Field
Resets the current field value to the originally loaded value and clears any validation messages.

Overrides:
reset in class Field<java.lang.String>

setButtonIcon

public void setButtonIcon(com.google.gwt.user.client.ui.AbstractImagePrototype buttonIconStyle)
Sets the button icon class.

Parameters:
buttonIconStyle - the button icon style

setButtonOffset

public void setButtonOffset(int buttonOffset)
Sets the number of pixels between the input element and the browser button (defaults to 3).


setName

public void setName(java.lang.String name)
Description copied from class: Field
Sets the field's HTML name attribute.

Overrides:
setName in class Field<java.lang.String>
Parameters:
name - the name

setReadOnly

public void setReadOnly(boolean readOnly)
Description copied from class: Field
Sets the field's read only state.

Overrides:
setReadOnly in class Field<java.lang.String>
Parameters:
readOnly - the read only state