objectivehtml.htmlwidget
Class HtmlFileInput
java.lang.Object
|
+--objectivehtml.oms.OMSObject
|
+--objectivehtml.htmlwidget.HtmlElement
|
+--objectivehtml.htmlwidget.HtmlWidget
|
+--objectivehtml.htmlwidget.HtmlControlWidget
|
+--objectivehtml.htmlwidget.HtmlInput
|
+--objectivehtml.htmlwidget.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:
- valueChanged(String,String) - if the object "value" attribute is changed
- dataSubmitted(String) - if submitted data for this object is received
- dataSubmitted(String[]) - if submitted data for this object is received
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 |
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.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UPLOADED_FILES
public static final java.lang.String UPLOADED_FILES
- The attribute name that the UploadedFile objects are associated with
m_objUploadedFile
protected UploadedFile m_objUploadedFile
- Holds a reference to the file associated with object
HtmlFileInput
public HtmlFileInput(HtmlContainerWidget objParent,
java.lang.String sName)
throws InvalidControlNameException,
InvalidParentWidgetException,
InvalidChildWidgetException
- Constructs an instance of the HtmlHiddenInput object with the control name sName.
- Parameters:
objParent
- the parent of this widgetsName
- the unique control name for the object- Throws:
InvalidControlNameException
- if the control name is not validInvalidParentWidgetException
- if the specified parent widget is not validInvalidChildWidgetException
- if the parent widget does not accept this widget as a child
getUploadedFile
public UploadedFile getUploadedFile()
- Returns the file associated with this object.
- Returns:
- a UploadedFile object
- See Also:
setUploadedFile(objectivehtml.common.UploadedFile)
setUploadedFile
protected void setUploadedFile(UploadedFile objUploadedFile)
- Sets the file associated with this object.
- Parameters:
objUploadedFile
- the uploaded file- See Also:
getUploadedFile()
updateData
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. :
setValue(getSubmittedData(request));
The object will only be updated if the auto-update is on and if the object
is visible and not disabled.
- Overrides:
updateData
in class HtmlControlWidget
- Parameters:
objRequest
- the request object that contains the user submitted data- See Also:
HtmlInput.setValue(String)
,
HtmlWidget.isVisible()
,
HtmlControlWidget.isDisabled()
,
HtmlControlWidget.isAutoUpdate()
,
HtmlControlWidget.getSubmittedData(HttpServletRequest)