Creates the "Message"s to be supplied to the "MessageBar" Control.
Constructor for a new Message.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.commons.Message(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | id for the new control, generated automatically if no id is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
associatedElementId | string | Associated UI element ID. (Optional) For navigation to error field. Visibility: public |
|
design | string | Internal attribute, used to force the display of the "short" or the "long" text only. Visibility: public |
|
text | string | Message short text. (Mandatory) Visibility: public |
|
type | sap.ui.commons.MessageType | "Success", or "Warning", or "Error" messages. (Mandatory) Visibility: public |
Method | Description |
---|---|
bindDetails |
Registers a callback function to be invoked if long text Details are to be made available. This callback function will be supplied the corresponding Message "id", and should return the (simple) HTML string to be displayed within the Message Details Dialog. E.g.: myMessage.bindDetails(getDetails); function getDetails(sId) {... return htmlString;} |
sap.ui.commons.Message.extend |
Creates a new subclass of class sap.ui.commons.Message with name
|
getAssociatedElementId |
Gets current value of property associatedElementId. Associated UI element ID. (Optional) For navigation to error field. |
getDesign |
Gets current value of property design. Internal attribute, used to force the display of the "short" or the "long" text only. |
sap.ui.commons.Message.getMetadata |
Returns a metadata object for class sap.ui.commons.Message. |
getText |
Gets current value of property text. Message short text. (Mandatory) |
getType |
Gets current value of property type. "Success", or "Warning", or "Error" messages. (Mandatory) |
setAssociatedElementId |
Sets a new value for property associatedElementId. Associated UI element ID. (Optional) For navigation to error field. When called with a value of |
setDesign |
Sets a new value for property design. Internal attribute, used to force the display of the "short" or the "long" text only. When called with a value of |
setText |
Sets a new value for property text. Message short text. (Mandatory) When called with a value of |
setType |
Sets a new value for property type. "Success", or "Warning", or "Error" messages. (Mandatory) When called with a value of |
Registers a callback function to be invoked if long text Details are to be made available.
This callback function will be supplied the corresponding Message "id", and should return the (simple) HTML string to be displayed within the Message Details Dialog.
E.g.: myMessage.bindDetails(getDetails); function getDetails(sId) {... return htmlString;}
Param | Type | DefaultValue | Description |
---|---|---|---|
fnCallBack | function |
the callback function |
Creates a new subclass of class sap.ui.commons.Message with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Gets current value of property associatedElementId.
Associated UI element ID. (Optional) For navigation to error field.
Gets current value of property design.
Internal attribute, used to force the display of the "short" or the "long" text only.
Gets current value of property type.
"Success", or "Warning", or "Error" messages. (Mandatory)
Sets a new value for property associatedElementId.
Associated UI element ID. (Optional) For navigation to error field.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAssociatedElementId | string |
New value for property |
Sets a new value for property design.
Internal attribute, used to force the display of the "short" or the "long" text only.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDesign | string |
New value for property |
Sets a new value for property text.
Message short text. (Mandatory)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sText | string |
New value for property |
Sets a new value for property type.
"Success", or "Warning", or "Error" messages. (Mandatory)
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | sap.ui.commons.MessageType |
New value for property |