Class HtmlFileInput


public class HtmlFileInput
extends HtmlInput

This class represents a html file input field. i.e.

<input type="file" ... >

The object can be used to upload a file from the client machine.

The widget emits these signals:

Field Summary
protected  UploadedFile m_objUploadedFile
          Holds a reference to the file associated with object
static java.lang.String UPLOADED_FILES
          The attribute name that the UploadedFile objects are associated with
Fields inherited from class objectivehtml.htmlwidget.HtmlControlWidget
m_bAutoEscape, m_bAutoUpdate
Fields inherited from class objectivehtml.htmlwidget.HtmlWidget
m_bDestroyed, m_bVisible, m_objHtmlForm, m_objParentWidget
Fields inherited from class objectivehtml.htmlwidget.HtmlElement
m_hmAttributes, m_sEndTag, m_sQuoteType, m_sStartTag
Constructor Summary
HtmlFileInput(HtmlContainerWidget objParent, java.lang.String sName)
          Constructs an instance of the HtmlHiddenInput object with the control name sName.
Method Summary
 UploadedFile getUploadedFile()
          Returns the file associated with this object.
protected  void setUploadedFile(UploadedFile objUploadedFile)
          Sets the file associated with this object.
 void updateData(javax.servlet.http.HttpServletRequest objRequest)
          Updates this object with the data submitted from the client.
Methods inherited from class objectivehtml.htmlwidget.HtmlInput
genStartTag, getText, getType, getValue, setAttribute, setBooleanAttribute, setText, setType, setValue, valueChanged
Methods inherited from class objectivehtml.htmlwidget.HtmlControlWidget
dataSubmitted, dataSubmitted, destroy, getName, getOnBlur, getOnChange, getOnFocus, getOnSelect, getSubmittedData, getSubmittedDataSet, getTabIndex, getUpdateOrder, isAutoEscape, isAutoUpdate, isDisabled, printHtml, printHtml, setAutoEscape, setAutoUpdate, setDisabled, setOnBlur, setOnChange, setOnFocus, setOnSelect, setTabIndex, setUpdateOrder, setVisible
Methods inherited from class objectivehtml.htmlwidget.HtmlWidget
changeParent, changeParent, getClassAttribute, getHtmlForm, getID, getOnClick, getOnDblClick, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getParent, getStyle, isDestroyed, isVisible, setClassAttribute, setID, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStyle
Methods inherited from class objectivehtml.htmlwidget.HtmlElement
genEndTag, genStartTag, getAttribute, getAttributes, getBooleanAttribute, getQuoteType, printHtml, printHtml, printHtml, printHtml, printHtml, printHtml, setQuoteType, toString, toString
Methods inherited from class objectivehtml.oms.OMSObject
compareClasses, connect, disconnect, emit, isAlive, setAlive, signal, slot, slot
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


public static final java.lang.String UPLOADED_FILES
The attribute name that the UploadedFile objects are associated with


protected UploadedFile m_objUploadedFile
Holds a reference to the file associated with object
Constructor Detail


public HtmlFileInput(HtmlContainerWidget objParent,
                     java.lang.String sName)
              throws InvalidControlNameException,
Constructs an instance of the HtmlHiddenInput object with the control name sName.
objParent - the parent of this widget
sName - the unique control name for the object
InvalidControlNameException - if the control name is not valid
InvalidParentWidgetException - if the specified parent widget is not valid
InvalidChildWidgetException - if the parent widget does not accept this widget as a child
Method Detail


public UploadedFile getUploadedFile()
Returns the file associated with this object.
a UploadedFile object
See Also:


protected void setUploadedFile(UploadedFile objUploadedFile)
Sets the file associated with this object.
objUploadedFile - the uploaded file
See Also:


public void updateData(javax.servlet.http.HttpServletRequest objRequest)

Updates this object with the data submitted from the client. The data submitted from the client will be set in the object by the setValue(String) method. i.e. :


The object will only be updated if the auto-update is on and if the object is visible and not disabled.

updateData in class HtmlControlWidget
objRequest - the request object that contains the user submitted data
See Also:
HtmlInput.setValue(String), HtmlWidget.isVisible(), HtmlControlWidget.isDisabled(), HtmlControlWidget.isAutoUpdate(), HtmlControlWidget.getSubmittedData(HttpServletRequest)