|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--objectivehtml.oms.OMSObject
|
+--objectivehtml.htmlwidget.HtmlElement
|
+--objectivehtml.htmlwidget.HtmlWidget
|
+--objectivehtml.htmlwidget.HtmlControlWidget
|
+--objectivehtml.htmlwidget.HtmlInput
This abstract class is the base class for all control widgets that use the "input" tag. i.e.
<input type="text" ... >
The class implements all the common functionality that all "input" objects have.
If auto-escape is turned on then the text set in the "value" attribute will be escaped before being written out by the HtmlUtils.htmlSpecialChars(String) method.
getValue(),
HtmlUtils.htmlSpecialChars(String)| 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 | |
HtmlInput(HtmlContainerWidget objParent,
java.lang.String sName,
java.lang.String sType,
boolean bSkipNameValidation)
Constructs an instance of the HtmlInput object. |
|
| Method Summary | |
protected java.lang.String |
genStartTag(int nOutputType)
Generates the start tag with all the attribute values that have been set for this object. |
java.lang.String |
getText()
Alias for getValue(). |
java.lang.String |
getType()
Returns the type of this object. |
java.lang.String |
getValue()
Returns the value of this object. |
void |
setAttribute(java.lang.String sAttribute,
java.lang.String sValue)
Sets a html attribute for this object. |
void |
setBooleanAttribute(java.lang.String sAttribute,
boolean bIsOn)
Sets a html boolean-attribute for this object. |
void |
setText(java.lang.String sText)
Alias for setValue(String). |
protected void |
setType(java.lang.String sType)
Sets the type of this object. |
void |
setValue(java.lang.String sValue)
Sets the value for this input object. |
Signal |
valueChanged(java.lang.String sNewValue,
java.lang.String sOldValue)
This signal is emitted when the "value" attribute of this object is changed. |
| 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, updateData |
| 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 |
| Constructor Detail |
public HtmlInput(HtmlContainerWidget objParent,
java.lang.String sName,
java.lang.String sType,
boolean bSkipNameValidation)
throws InvalidControlNameException,
InvalidParentWidgetException,
InvalidChildWidgetException
objParent - the parent of this widgetsName - the unique control name for the objectsType - can be a string value of the following control types:
text|password|checkbox|radio|submit|reset|file|hidden|image|buttonInvalidControlNameException - 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| Method Detail |
public java.lang.String getType()
HtmlElement.getAttribute(String),
setType(String)protected void setType(java.lang.String sType)
Sets the type of this object. The type will determine the type of "input" object this will become.
This is a protected method and should remain so. T
he html attribute it sets is "type".
If null is specified the attribute is cleared.
sType - the type for this elementsetAttribute(String, String),
getType()public java.lang.String getText()
getValue(),
setText(String)public void setText(java.lang.String sText)
sText - the text for this input objectsetValue(String),
getText()public java.lang.String getValue()
setValue(String),
HtmlElement.getAttribute(String)public void setValue(java.lang.String sValue)
Sets the value for this input object.
The html attribute it sets is "value".
If null is specified the attribute is cleared.
sValue - the value for this elementsetAttribute(String, String),
getValue()
public void setAttribute(java.lang.String sAttribute,
java.lang.String sValue)
throws InvalidAttributeException
Sets a html attribute for this object. The name of the attribute is case-insensitive.
Calls parent version of the method but stops the "type" attribute being changed! If "type" is specified then an InvalidAttributeException is thrown.
setAttribute in class HtmlControlWidgetsName - the name of the attributesValue - the value of the attribute, if null is specified
then the attribute will be clearedInvalidAttributeException - if the name is not validsetBooleanAttribute(String, boolean)
public void setBooleanAttribute(java.lang.String sAttribute,
boolean bIsOn)
throws InvalidAttributeException
Sets a html boolean-attribute for this object. The name of the attribute is case-insensitive.
Calls parent version of the method but stops the "type" attribute being changed! If "type" is specified then an InvalidAttributeException is thrown.
setBooleanAttribute in class HtmlControlWidgetsName - the name of the attributebIsOn - true if attribute should be set, if false
is specified then the attribute is clearedInvalidAttributeException - if the name is not validsetAttribute(String, String)protected java.lang.String genStartTag(int nOutputType)
Generates the start tag with all the attribute values that have been set for this object.
If auto-escape is turned on then the text set in the "value" attribute will be escaped before being written out by the HtmlUtils.htmlSpecialChars(String) method.
genStartTag in class HtmlElementnOutputType - the output typeHtmlControlWidget.isAutoEscape(),
getValue(),
HtmlUtils.htmlSpecialChars(String)
public Signal valueChanged(java.lang.String sNewValue,
java.lang.String sOldValue)
sNewValue - the new valuesOldValue - the old value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||