|
|||||||||
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.HtmlTextArea
This class represents a html text area. i.e.
<textarea ... >
This widget allows users to enter textual data. Its similar to the HtmlTextBox but differs in that it can cater for multiple lines of text. You can set the size of text area by setting the number of columns and rows.
Both the HtmlTextBox and this class support the read-only mode. This can be used to display text that is not be modifiable.
If auto-escape is turned on then the text part of the object will be escaped before being written out by the HtmlUtils.htmlSpecialChars(String) method.
The widget emits these signals:
HtmlTextBox
,
getText()
,
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 | |
HtmlTextArea(HtmlContainerWidget objParent,
java.lang.String sName)
Constructs a new instance of HtmlTextArea with the specified parent and control name. |
Method Summary | |
java.lang.String |
getCols()
Returns the number of columns for the text area. |
java.lang.String |
getRows()
Returns the number of rows for the text area. |
java.lang.String |
getText()
Returns the text of this object. |
boolean |
isReadOnly()
Returns true if the text area is in read-only mode, false otherwise |
void |
printHtml(javax.servlet.jsp.JspWriter objWriter,
int nOutputType)
Prints the html that represents this object to the output stream. |
void |
printHtml(java.io.PrintWriter objWriter,
int nOutputType)
Prints the html that represents this object to the output stream. |
void |
setCols(java.lang.String sCols)
Sets the number of columns for the text area. |
void |
setReadOnly(boolean bReadOnly)
Sets the text area to be either read-only or read-write mode. |
void |
setRows(java.lang.String sRows)
Sets the number of rows for the text area. |
void |
setText(java.lang.String sText)
Sets the text of this object. |
Signal |
textChanged(java.lang.String sNewText,
java.lang.String sOldText)
This signal is emitted when the text of the text area is changed. |
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, setAttribute, setAutoEscape, setAutoUpdate, setBooleanAttribute, 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, 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 HtmlTextArea(HtmlContainerWidget objParent, java.lang.String sName) throws InvalidControlNameException, InvalidParentWidgetException, InvalidChildWidgetException
objParent
- the parent of this widgetsName
- the unique control name for the objectInvalidControlNameException
- 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 childMethod Detail |
public java.lang.String getText()
setText(String)
public void setText(java.lang.String sText)
sText
- the textgetText()
public java.lang.String getRows()
setRows(String)
public void setRows(java.lang.String sRows)
Sets the number of rows for the text area.
The html attribute it sets is "rows".
If null is specified the attribute is cleared.
sRows
- the rows for this widget,
if null is specified then this attribute
will be clearedgetRows()
public java.lang.String getCols()
setCols(String)
public void setCols(java.lang.String sCols)
Sets the number of columns for the text area.
The html attribute it sets is "columns".
If null is specified the attribute is cleared.
sCols
- the rows for this widget,
if null is specified then this attribute
will be clearedgetCols()
public void setReadOnly(boolean bReadOnly)
Sets the text area to be either read-only or read-write mode. In read-only mode the text area becomes unmodifiable.
The html attribute it sets is "readonly".
If false is specified the attribute is cleared.
bReadOnly
- true if read-only, false if read-writeHtmlControlWidget.setBooleanAttribute(String, boolean)
,
isReadOnly()
public boolean isReadOnly()
HtmlElement.getBooleanAttribute(String)
,
setReadOnly(boolean)
public void updateData(javax.servlet.http.HttpServletRequest objRequest)
Updates this object with the data submitted from the client. It will update the text (using setText(String)) of this object with the data submitted.
The object will only be updated if the auto-update is on and if the object is visible and not disabled and not in read-only mode.
updateData
in class HtmlControlWidget
objRequest
- the request object that contains the user submitted datagetText()
,
HtmlWidget.isVisible()
,
HtmlControlWidget.isDisabled()
,
HtmlControlWidget.isAutoUpdate()
,
HtmlControlWidget.getSubmittedData(HttpServletRequest)
public Signal textChanged(java.lang.String sNewText, java.lang.String sOldText)
sNewText
- the new textsOldText
- the old textpublic void printHtml(java.io.PrintWriter objWriter, int nOutputType) throws java.io.IOException
printHtml
in class HtmlControlWidget
objWriter
- the output stream for a Servlet objectnOutputType
- the output typepublic void printHtml(javax.servlet.jsp.JspWriter objWriter, int nOutputType) throws java.io.IOException
printHtml
in class HtmlControlWidget
objWriter
- the output stream for a Jsp pagenOutputType
- the output type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |