|
|||||||||
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.HtmlText
This class provides the developer with a generic way of inserting plain text or html text into the form.
Unlike the other widgets, this object doesn't really represent any specific html element. There are generally 2 purposes this object can be used for. The first purpose is simply to use the object to get plain text into the form. The second purpose is when you need to include specific html code in the form.
If auto-escape is turned on (default) then the text will be escaped (using HtmlUtils.htmlSpecialChars(String)) before being written out. This should generally be turned on if your text is just plain text, if you have html to write then auto-escape should be turned off.
HtmlUtils.htmlSpecialChars(String)
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 | |
HtmlText(HtmlContainerWidget objParent)
The constructs an instance of HtmlText with parent objParent. |
Method Summary | |
void |
destroy()
Overrides the default implementation to make this method public. |
java.lang.String |
getText()
Returns the text for this object. |
boolean |
isAutoEscape()
Returns whether the auto-escape feature is on or not. |
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 |
setAutoEscape(boolean bAutoEscape)
Sets the auto-escape feature to be either on (default) or off. |
void |
setText(java.lang.String sText)
Sets the text for this object. |
void |
setVisible(boolean bVisible)
Sets the visibility of this object. |
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, setAttribute, setBooleanAttribute, 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 HtmlText(HtmlContainerWidget objParent) throws InvalidParentWidgetException, InvalidChildWidgetException
objParent
- the parent object of this tableInvalidParentWidgetException
- if the specified parent widget is not validInvalidChildWidgetException
- if the parent widget does not accept this widget as a childMethod Detail |
public void setVisible(boolean bVisible)
setVisible
in class HtmlWidget
bVisible
- true if visible, false otherwisepublic void setText(java.lang.String sText)
sText
- plain text/html textpublic java.lang.String getText()
public void setAutoEscape(boolean bAutoEscape)
bAutoEscape
- true if you want auto-escape on (default), false otherwiseHtmlUtils.htmlSpecialChars(String)
,
isAutoEscape()
public boolean isAutoEscape()
setAutoEscape(boolean)
public void destroy()
destroy
in class HtmlWidget
objectivehtml.htmlwidget.HtmlWidget
HtmlWidget.isDestroyed()
public void printHtml(java.io.PrintWriter objWriter, int nOutputType) throws java.io.IOException
printHtml
in class HtmlElement
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 HtmlElement
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 |