|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
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 or HTML links, so developers needing those should either use the tableLayout and link beans 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 |
getText()
Gets the formatted text, optionally containing a very limited set of HTML markup as defined above. |
static java.lang.String |
getText(MutableUINode bean)
Gets the formatted text, optionally containing a very limited set of HTML markup as defined above. |
static void |
setText(MutableUINode bean,
java.lang.String text)
Sets the formatted text, optionally containing a very limited set of HTML markup as defined above. |
void |
setText(java.lang.String text)
Sets the formatted text, optionally containing a very limited set of HTML markup as defined above. |
void |
setTextBinding(BoundValue boundValue)
Binds the the formatted text, optionally containing a very limited set of HTML markup as defined above. |
static void |
setTextBinding(MutableUINode bean,
BoundValue boundValue)
Binds the the formatted text, optionally containing a very limited set of HTML markup as defined above. |
static void |
setTextBinding(MutableUINode bean,
java.lang.Object selectKey)
Binds the the formatted text, optionally containing a very limited set of HTML markup as defined above. |
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 as defined above. |
void |
setTextBinding(java.lang.Object selectKey)
Binds the the formatted text, optionally containing a very limited set of HTML markup as defined above. |
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 as defined above. |
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 as defined above. |
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 as defined above. |
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 as defined above.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 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
.
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |