|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.ui.DeprecatedUINode | +--oracle.cabo.ui.BaseUINode | +--oracle.cabo.ui.BaseMutableUINode | +--oracle.cabo.ui.beans.BaseWebBean | +--oracle.cabo.ui.beans.MarlinBean | +--oracle.cabo.ui.beans.FormattedTextBean
The formattedText bean accepts a string in its "text" attribute containing a very limited set of HTML markup and outputs formatted results. It is not intended as anything near to a generic HTML output engine, and will never be such a bean. Developers needing this functionality must use the rawText bean. For example, this bean does not (and will not) support use of HTML tables, so developers needing these should either use the tableLayout or just the rawText bean.
What this bean does provide is a limited ability to use a single source for translated or user-provided formatted text without further parsing or filtering or dangerous constructs (e.g., Javascript), and with some hope of successful output to non-HTML displays. It also supports more attributes than the rawText bean - for example, it supports styleClass.
This component supports the following HTML markup:
Elements or entities other than these will be ignored. In addition, the CSS attributes ("class" and "style") and "href" are supported - all others are ignored.
FormattedTextBean bean = new FormattedTextBean(); bean.setText("This is some text.<br>A new bit of<p>&text" + " that is <b>bold</b> and <span class=\"OraHeader\">" + " styled</span>");
No guarantee is made that the input HTML will be output without modification. For example, paragraph and list-item elements will always be closed even if left open in the input text. Other HTML markup may be replaced with output more appropriate to the current look-and-feel or user agent.
Constructor Summary | |
|
FormattedTextBean()
Construct an instance of the FormattedTextBean. |
protected |
FormattedTextBean(boolean ignored,
java.lang.String localName)
Construct an instance of the FormattedTextBean. |
|
FormattedTextBean(java.lang.String text)
Construct an instance of the FormattedTextBean. |
Method Summary | |
java.lang.String |
getStyleUsage()
Gets the style usage, intended to make it easier to put the correct style on the text. |
static java.lang.String |
getStyleUsage(MutableUINode bean)
Gets the style usage, intended to make it easier to put the correct style on the text. |
java.lang.String |
getText()
Gets the formatted text, optionally containing a very limited set of HTML markup. |
static java.lang.String |
getText(MutableUINode bean)
Gets the formatted text, optionally containing a very limited set of HTML markup. |
static void |
setStyleUsage(MutableUINode bean,
java.lang.String styleUsage)
Sets the style usage, intended to make it easier to put the correct style on the text. |
void |
setStyleUsage(java.lang.String styleUsage)
Sets the style usage, intended to make it easier to put the correct style on the text. |
static void |
setText(MutableUINode bean,
java.lang.String text)
Sets the formatted text, optionally containing a very limited set of HTML markup. |
void |
setText(java.lang.String text)
Sets the formatted text, optionally containing a very limited set of HTML markup. |
void |
setTextBinding(BoundValue boundValue)
Binds the the formatted text, optionally containing a very limited set of HTML markup. |
static void |
setTextBinding(MutableUINode bean,
BoundValue boundValue)
Binds the the formatted text, optionally containing a very limited set of HTML markup. |
static void |
setTextBinding(MutableUINode bean,
java.lang.Object selectKey)
Binds the the formatted text, optionally containing a very limited set of HTML markup. |
static void |
setTextBinding(MutableUINode bean,
java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the the formatted text, optionally containing a very limited set of HTML markup. |
void |
setTextBinding(java.lang.Object selectKey)
Binds the the formatted text, optionally containing a very limited set of HTML markup. |
void |
setTextBinding(java.lang.String dataNamespace,
java.lang.String dataName,
java.lang.Object selectKey)
Binds the the formatted text, optionally containing a very limited set of HTML markup. |
static void |
setTranslatableText(MutableUINode bean,
java.lang.String bundleName,
java.lang.String key)
Binds to a ResourceBundle the the formatted text, optionally containing a very limited set of HTML markup. |
void |
setTranslatableText(java.lang.String bundleName,
java.lang.String key)
Binds to a ResourceBundle the the formatted text, optionally containing a very limited set of HTML markup. |
Methods inherited from class oracle.cabo.ui.beans.MarlinBean |
isEqualMarlinName |
Methods inherited from class oracle.cabo.ui.BaseUINode |
getAttributeNames, getAttributeValue, getAttributeValueImpl, getChildArray, getChildNames, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getPreorderDescendentAttributeValue, getRawAttributeValue, getRenderedUINode, getRenderer, getRenderer, render, render, toString |
Methods inherited from class oracle.cabo.ui.DeprecatedUINode |
getAttributeValue, getChildNames, getNamedChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.cabo.ui.UINode |
getAttributeNames, getAttributeValue, getAttributeValue, getChildNames, getChildNames, getIndexedChild, getIndexedChild, getIndexedChildCount, getLocalName, getNamedChild, getNamedChild, getNamespaceURI, getNodeID, getNodeRole, getRawAttributeValue, render, render |
Constructor Detail |
public FormattedTextBean()
public FormattedTextBean(java.lang.String text)
text
- the formatted text, optionally containing a very limited set of
HTML markup.protected FormattedTextBean(boolean ignored, java.lang.String localName)
Method Detail |
public final java.lang.String getText()
public final void setText(java.lang.String text)
public final void setTranslatableText(java.lang.String bundleName, java.lang.String key)
bundleName
- the name of the ResourceBundlekey
- the key of the string to retrieve from the ResourceBundlepublic final void setTextBinding(BoundValue boundValue)
boundValue
- a BoundValue implementation to be used
to retrieve the value.public final void setTextBinding(java.lang.Object selectKey)
selectKey
- the key to be passed to selectValue()
on the
current DataObject
, e.g., the DataObject for the current
table row.public final void setTextBinding(java.lang.String dataNamespace, java.lang.String dataName, java.lang.Object selectKey)
dataNamespace
- the namespace to be passed to
RenderingContext.getDataObject()
dataName
- the name to be passed to
RenderingContext.getDataObject()
selectKey
- the key to be passed to selectValue()
on the
DataObject
.public final java.lang.String getStyleUsage()
public final void setStyleUsage(java.lang.String styleUsage)
public static java.lang.String getText(MutableUINode bean)
public static void setText(MutableUINode bean, java.lang.String text)
public static void setTranslatableText(MutableUINode bean, java.lang.String bundleName, java.lang.String key)
bundleName
- the name of the ResourceBundlekey
- the key of the string to retrieve from the ResourceBundlepublic static void setTextBinding(MutableUINode bean, BoundValue boundValue)
boundValue
- a BoundValue implementation to be used
to retrieve the value.public static void setTextBinding(MutableUINode bean, java.lang.Object selectKey)
selectKey
- the key to be passed to selectValue()
on the
current DataObject
, e.g., the DataObject for the current
table row.public static void setTextBinding(MutableUINode bean, java.lang.String dataNamespace, java.lang.String dataName, java.lang.Object selectKey)
dataNamespace
- the namespace to be passed to
RenderingContext.getDataObject()
dataName
- the name to be passed to
RenderingContext.getDataObject()
selectKey
- the key to be passed to selectValue()
on the
DataObject
.public static java.lang.String getStyleUsage(MutableUINode bean)
public static void setStyleUsage(MutableUINode bean, java.lang.String styleUsage)
|
UIX 2.2.16 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |