|
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.data.DictionaryData | +--oracle.cabo.ui.data.MessageData
When combined with InlineMessageBean, or any of the other "message" beans (beans in the oracle.cabo.ui.beans.message package), the MessageData class makes it easy to automatically show error, warning, or informational messages and icons around form widgets without adjusting a page's hierarchy. The MessageData object provides a standard binding for all the error, info, and warning information on a page.
The MessageBoxBean can also utilize the MessageData to automatically configure itself to display messages based on the contents of a MessageData instance. More details on utilizing this functionality can be found in the MessageBoxBean documentation.
To use, when creating your UINodes:
MessageData.bindNode()
.
addError()
, addWarning()
,
or addInfo()
. Pass the same name
that was sent to MessageData.bindNode()
MessageData.addToRenderingContext()
bindNode()
method,
and register the DataObject yourself before rendering.
A MessageData is essentially a DictionaryData, where each of the contained elements is itself a DataObject. These contained DataObjects contain three properties:
When bound (using one of the two bindNode()
methods),
the MESSAGE_TYPE_ATTR
, MESSAGE_ATTR
, and
LONG_DESC_URL_ATTR
attributes of the target node will be
dynamically retrieved from one of the pieces of the MessageData
object.
MessageBean
,
MessageBoxBean
,
MessagePromptBean
,
MessageTextBean
Field Summary | |
static java.lang.String |
MESSAGE_DATA_COUNT_SELECT
Deprecated. since 2.0; call getLength() on the DataObjectList returned by MESSAGE_DATA_MESSAGES_SELECT instead |
static java.lang.String |
MESSAGE_DATA_MESSAGE
A key value which can be passed to selectValue()
to return the summary text for the entire set of messages. |
static java.lang.String |
MESSAGE_DATA_MESSAGES_SELECT
A key value which can be passed to selectValue()
to return a DataObjectList with each DataObject representing the
message data for one of the registered messages. |
static java.lang.String |
MESSAGE_DATA_OBJECT_NAME
Default name under which MessageData DataObjects may be registered. |
static java.lang.String |
MESSAGE_DATA_TYPE_SELECT
A key value which can be passed to selectValue()
to return one of the UIConstants (e.g. |
Constructor Summary | |
MessageData()
Creates an empty MessageData. |
Method Summary | |
void |
addError(java.lang.Object select,
java.lang.String message,
java.lang.String longDescURL)
Adds an error message. |
void |
addError(java.lang.Object select,
java.lang.String message,
java.lang.String longDescURL,
java.lang.String messageLinkText,
java.lang.String messageDescription)
Adds an error message. |
void |
addInfo(java.lang.Object select,
java.lang.String message,
java.lang.String longDescURL)
Adds an informational message. |
void |
addInfo(java.lang.Object select,
java.lang.String message,
java.lang.String longDescURL,
java.lang.String messageLinkText,
java.lang.String messageDescription)
Adds an informational message. |
void |
addMessage(java.lang.Object select,
java.lang.String message,
java.lang.String longDescURL,
java.lang.String messageType)
Adds a message. |
void |
addMessage(java.lang.Object select,
java.lang.String message,
java.lang.String longDescURL,
java.lang.String messageType,
java.lang.String messageLinkText,
java.lang.String messageDescription)
Adds a message. |
void |
addToRenderingContext(RenderingContext context)
Attaches a MessageData object to a
RenderingContext . |
void |
addWarning(java.lang.Object select,
java.lang.String message,
java.lang.String longDescURL)
Adds a warning message. |
void |
addWarning(java.lang.Object select,
java.lang.String message,
java.lang.String longDescURL,
java.lang.String messageLinkText,
java.lang.String messageDescription)
Adds a warning message. |
static void |
bindNode(MutableUINode node,
BoundValue boundValue)
Binds a bean's (usually, a InlineMessageBean) message-related attributes to a piece of a MessageData. |
static void |
bindNode(MutableUINode node,
java.lang.Object select)
Binds a bean's (usually, a InlineMessageBean) message-related attributes to a piece of a MessageData. |
static void |
bindNode(MutableUINode node,
java.lang.Object select,
java.lang.String namespaceURI,
java.lang.String name)
Binds a bean's (usually, a InlineMessageBean) message-related attributes to a piece of a MessageData. |
static void |
bindNodes(MutableUINode promptNode,
MutableUINode textNode,
BoundValue boundValue)
Binds a pair of beans' (usually, a MessagePromptBean and a MessageTextBean) message-related attributes to a piece of a MessageData. |
static void |
bindNodes(MutableUINode promptNode,
MutableUINode textNode,
java.lang.Object select)
Binds a pair of beans' (usually, a MessagePromptBean and a MessageTextBean) message-related attributes to a piece of a MessageData. |
static void |
bindNodes(MutableUINode promptNode,
MutableUINode textNode,
java.lang.Object select,
java.lang.String namespaceURI,
java.lang.String name)
Binds a pair of beans' (usually, a MessagePromptBean and a MessageTextBean) message-related attributes to a piece of a MessageData. |
static void |
bindRowNode(MutableUINode node,
java.lang.Object rowKey)
Binds the message-related attributes of a bean used as a row in a table to a piece of MessageData. |
static void |
bindRowNodes(MutableUINode promptNode,
MutableUINode textNode,
java.lang.Object rowKey)
Binds the message-related attributes of a pair of beans used in a row of a table. |
DataObject |
getItem(int index)
Returns the message at the index. |
int |
getLength()
Returns the number of contained messages. |
java.lang.String |
getMessage()
Sets the main message for the entire box. |
java.lang.Object |
selectValue(RenderingContext context,
java.lang.Object select)
Returns the value registered with the select key. |
void |
setMessage(java.lang.String message)
Sets the main message for the entire box. |
DataProvider |
toDataProvider()
Converts the MessageData into a DataProvider. |
Methods inherited from class oracle.cabo.ui.data.DictionaryData |
keys, put, updateValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MESSAGE_DATA_OBJECT_NAME
bindNode()
and addRenderingContext()
methods use this value.public static final java.lang.String MESSAGE_DATA_COUNT_SELECT
selectValue()
to return an Integer representing the number of messages currently
registered in a MessageData.public static final java.lang.String MESSAGE_DATA_MESSAGES_SELECT
selectValue()
to return a DataObjectList with each DataObject representing the
message data for one of the registered messages.public static final java.lang.String MESSAGE_DATA_TYPE_SELECT
selectValue()
to return one of the UIConstants (e.g. MESSAGE_TYPE_ERROR,
MESSAGE_TYPE_INFO, etc.) indicating which type of message is registered
in this MessageData, or null if none is registered. In the case of
multiple types, "error" takes highest precedence, followed by "warning",
"info".public static final java.lang.String MESSAGE_DATA_MESSAGE
selectValue()
to return the summary text for the entire set of messages.Constructor Detail |
public MessageData()
Method Detail |
public static void bindNode(MutableUINode node, java.lang.Object select)
MESSAGE_DATA_OBJECT_NAME
name.node
- the node (generally, a InlineMessageBean)select
- the select key that will be used to retrieve
the message informationpublic static void bindNode(MutableUINode node, java.lang.Object select, java.lang.String namespaceURI, java.lang.String name)
MESSAGE_DATA_OBJECT_NAME
name.node
- the node (generally, a InlineMessageBean)select
- the select key that will be used to retrieve
the message informationnamespaceURI
- the namespace to retrieve the message DataObject fromname
- the name of the message DataObjectpublic static void bindNode(MutableUINode node, BoundValue boundValue)
node
- the node (generally, a InlineMessageBean)boundValue
- a BoundValue that will return the DataObject
containing messages for this nodepublic static void bindNodes(MutableUINode promptNode, MutableUINode textNode, java.lang.Object select)
MESSAGE_DATA_OBJECT_NAME
name.promptNode
- the message prompt (usually a MessagePromptBean)textNode
- the message text (usually a MessageTextBean)select
- the select key that will be used to retrieve
the message informationpublic static void bindNodes(MutableUINode promptNode, MutableUINode textNode, java.lang.Object select, java.lang.String namespaceURI, java.lang.String name)
MESSAGE_DATA_OBJECT_NAME
name.promptNode
- the message prompt (usually a MessagePromptBean)textNode
- the message text (usually a MessageTextBean)select
- the select key that will be used to retrieve
the message informationnamespaceURI
- the namespace to retrieve the message DataObject fromname
- the name of the message DataObjectpublic static void bindNodes(MutableUINode promptNode, MutableUINode textNode, BoundValue boundValue)
promptNode
- the message prompt (usually a MessagePromptBean)textNode
- the message text (usually a MessageTextBean)boundValue
- a BoundValue that will return the DataObject
containing messages for this nodepublic static void bindRowNode(MutableUINode node, java.lang.Object rowKey)
The message DataObject will be retrieved from the default location
(the UIX Components (Marlin) namespace, and named
MESSAGE_DATA_OBJECT_NAME
). The key passed
in will not be used directly, but will instead be used
to get the "real" key from the current DataObject.
For variations on this behavior (like looking for the message DataObject at another location), clients can use the RowMessageBoundValue class.
node
- the node (generally, a InlineMessageBean)rowKey
- the key that will be used to retrieve
the "real" message key.RowMessageBoundValue
public static void bindRowNodes(MutableUINode promptNode, MutableUINode textNode, java.lang.Object rowKey)
The message DataObject will be retrieved from the default location
(the UIX Components (Marlin) namespace, and named
MESSAGE_DATA_OBJECT_NAME
). The key passed
in will not be used directly, but will instead be used
to get the "real" key from the current DataObject.
For variations on this behavior (like looking for the message DataObject at another location), clients can use the RowMessageBoundValue class.
promptNode
- the message prompt (usually a MessagePromptBean)textNode
- the message text (usually a MessageTextBean)rowKey
- the key that will be used to retrieve
the "real" message key.RowMessageBoundValue
public void setMessage(java.lang.String message)
public java.lang.String getMessage()
public DataProvider toDataProvider()
public void addToRenderingContext(RenderingContext context)
MessageData
object to a
RenderingContext
. The message DataObject
will be registered in the UIX Components (Marlin) namespace, and at the
MESSAGE_DATA_OBJECT_NAME
name.context
- a RenderingContextpublic final void addError(java.lang.Object select, java.lang.String message, java.lang.String longDescURL)
select
- the key that will be used to serve
the error messagemessage
- the text of the messagelongDescURL
- an optional link to a location
with more informationpublic final void addError(java.lang.Object select, java.lang.String message, java.lang.String longDescURL, java.lang.String messageLinkText, java.lang.String messageDescription)
select
- the key that will be used to serve
the error message. Maybe null for page-level errors.message
- the text of the message.
Maybe null for page-level messages.longDescURL
- an optional link to a location
with more informationmessageLinkText
- optional text to display as the item's link
text in a MessageBoxBeanmessageDescription
- optional text to display as the
item's description in a MessageBoxBeanpublic final void addWarning(java.lang.Object select, java.lang.String message, java.lang.String longDescURL)
select
- the key that will be used to serve
the warning messagemessage
- the text of the messagelongDescURL
- an optional link to a location
with more informationpublic final void addWarning(java.lang.Object select, java.lang.String message, java.lang.String longDescURL, java.lang.String messageLinkText, java.lang.String messageDescription)
select
- the key that will be used to serve
the warning message. Maybe null for page-level messages.message
- the text of the message.
Maybe null for page-level messages.longDescURL
- an optional link to a location
with more informationmessageLinkText
- optional text to display as the item's link
text in a MessageBoxBeanmessageDescription
- optional text to display as the
item's description in a MessageBoxBeanpublic final void addInfo(java.lang.Object select, java.lang.String message, java.lang.String longDescURL)
select
- the key that will be used to serve
the informational messagemessage
- the text of the message.longDescURL
- an optional link to a location
with more informationpublic final void addInfo(java.lang.Object select, java.lang.String message, java.lang.String longDescURL, java.lang.String messageLinkText, java.lang.String messageDescription)
select
- the key that will be used to serve
the informational message. Maybe null for page-level messages.message
- the text of the message.
Maybe null for page-level messages.longDescURL
- an optional link to a location
with more informationmessageLinkText
- optional text to display as the item's link
text in a MessageBoxBeanmessageDescription
- optional text to display as the
item's description in a MessageBoxBeanpublic final void addMessage(java.lang.Object select, java.lang.String message, java.lang.String longDescURL, java.lang.String messageType)
select
- the key that will be used to serve
the informational message.message
- the text of the message.longDescURL
- an optional link to a location
with more informationmessageType
- the type of the message; one of
"error", "warning", or "info"public void addMessage(java.lang.Object select, java.lang.String message, java.lang.String longDescURL, java.lang.String messageType, java.lang.String messageLinkText, java.lang.String messageDescription)
select
- the key that will be used to serve
the informational message. Maybe null for page-level messages.message
- the text of the message.
Maybe null for page-level messages.longDescURL
- an optional link to a location
with more information. maybe nullmessageType
- the type of the message; one of
"error", "warning", or "info"messageLinkText
- optional text to display as the item's link
text in a MessageBoxBean.messageDescription
- optional text to display as the
item's description in a MessageBoxBeanpublic java.lang.Object selectValue(RenderingContext context, java.lang.Object select)
selectValue
in class DictionaryData
oracle.cabo.ui.data.DataObject
context
- the current rendering contextselect
- a select criterion, syntax as defined by the data objectpublic int getLength()
getLength
in interface DataObjectList
public DataObject getItem(int index)
getItem
in interface DataObjectList
|
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 |