Class idx.widget.SingleMessage
Extends
dijit._TemplatedMixin, dijit._Widget, dijit._WidgetsInTemplateMixin.
SingleMessage is implemented according to IBM One UI(tm)
Messaging Standard.
It provides a convenient way to create One UI compliant messages in a designated area. SingleMessage is highly configurable with following options:
- Message type: SingleMessage supports 7 different message types. It can be configured via setting the 'type' property.
- Message ID: The ID of a SingleMessage can be configured via setting the 'messageId' property. Setting the 'showId' property can trun on/off the Message ID.
- Timestamp: The timestamp of a SingleMessage can be configured via setting the 'date' property. In addtion, the date format can be set with the 'dateFormat' property
- Message text: The message text can be configured via setting the 'title' property. The message text gets truncated with an ellipsis automatically when a SingleMessage resizes.
- Explanation: The message explanation can be confgiured via setting the 'description' property.
- Refresh Button: A SingleMessage contains a refresh link after the message explanation by default. It can be turned off by setting 'showRefresh' property to false.
- View All link: A SingleMessage contains a View All(n) link by default. The message number 'n' can be configured with 'messageNumber' property. It can be turned off by setting 'showAction' property to false.
Defined in: <idx\widget\SingleMessage.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
The text of the action link.
|
|
'closable' decides whether the SingleMessage can be closed.
|
|
'collapsed' decides whether the explanation part is hidden.
|
|
The timestamp of a Single Message.
|
|
The options being used for format the timestamp.
|
|
The explanation of a SingleMessage.
|
|
The ID of a SingleMessage.
|
|
The message number to be put in the View All link 'View All(n)'.
|
|
'showAction' decides whether to show the action link (ususally, it's View All link).
|
|
'showDetailsLink' decides whether to show the More Details link in the message description part.
|
|
'showId' decides whether to show the message ID.
|
|
'showRefresh' decides whether to show the refresh link in the message description part.
|
|
'showTimestamp' decides whether to show the timestamp.
|
|
The message text of a SingleMessage.
|
|
The type of a Single Message.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
Constructor
Initialize the Object variable in new Instance
|
|
onAction(e)
Event triggered when action link 'View All' is clicked.
|
|
onClick(e)
Event triggered when message title is clicked.
|
|
onClose(e)
Event triggered when the close button is clicked.
|
|
onIconEnter(e)
Event triggered when mouse enter the icon image.
|
|
onIconLeave(e)
Event triggered when mouse leave the icon image.
|
|
Event triggered when action link 'More Details' is clicked.
|
|
onRefresh(e)
Event triggered when action link 'Refresh' is clicked.
|
|
resize()
Ajust the content of the SingleMessage.
|
|
startup()
|
Constructor Detail
idx.widget.SingleMessage()
Programmatic Example:new idx.widget.SingleMessage({ type: 'error', title: 'Error message with long timestamp', dateFormat: {datePattern: 'dd MMMM y ', timePattern: 'hh:mm a'}, messageId: 'CAT123456', messageNumber: 7, style: 'width: 970px;', description: 'Here is the detail message description, it can be configured via setting the \'description\' parameter of a SingleMessage widget. By default the message description is the same as the message title.' }, domNode);Declarative Example:<div data-dojo-type="idx.widget.SingleMessage" data-dojo-props="type: 'error', title: 'Error message with long timestamp', dateFormat:{datePattern: 'dd MMMM y ', timePattern: 'hh:mm a'}, messageId: 'CAT123456', messageNumber: 7, style: 'width: 970px;', description: 'Here is the detail message description, it can be configured via setting the \'description\' parameter of a SingleMessage widget. By default the message description is the same as the message title.'">