MessageManager Class

The MessageManager class manages messages and prompts. It is used by the AppNotificationManager class.


Name Description
addMessage(message: NotifyMessageDetails): void Static Output a message and/or alert to the user.  
addToMessageCenter(message: NotifyMessageDetails): void Static Add a message to the Message Center.  
clearMessages(): void Static Clear the message list.  
displayInputFieldMessage(target: HTMLElement, messageText: HTMLElement | string, detailedMessage: HTMLElement | string = "", priority: OutputMessagePriority = OutputMessagePriority.Error): void Static Displays an input field message near target element.  
endActivityMessage(isCompleted: boolean): boolean Static Dismisses current ActivityMessage and ends activity if canceled.  
getIconClassName(details: NotifyMessageDetails): string Static Gets an icon CSS class name based on a given NotifyMessageDetails.  
getIconType(details: NotifyMessageDetails): MessageBoxIconType Static Gets a MessageBoxIconType based on a given NotifyMessageDetails.  
getSeverity(details: NotifyMessageDetails): MessageSeverity Static Gets a MessageSeverity based on a given NotifyMessageDetails.  
hideInputFieldMessage(): void Static Hides the currently displayed input field message.  
openMessageBox(mbType: MessageBoxType, message: HTMLElement | string, icon: MessageBoxIconType): Promise<MessageBoxValue> Static Output a MessageBox and wait for response from the user.  
outputPrompt(prompt: string): void Static Output a prompt to the user.  
setMaxCachedMessages(max: number): void Static Set the maximum number of cached message.  
setupActivityMessageDetails(details: ActivityMessageDetails): boolean Static Sets details for setting up an Activity message.  
setupActivityMessageValues(message: HTMLElement | string, percentage: number, restored?: false | true): boolean Static Sets values on _OngoingActivityMessage to be referenced when displaying
an ActivityMessage.


Name Type Description
messages Accessor StaticReadOnly Readonly<NotifyMessageDetails[]> List of messages as NotifyMessageDetails.  
onActivityMessageCancelledEvent Static ActivityMessageCancelledEvent The ActivityMessageCancelledEvent is fired when an Activity message is cancelled via
IModelApp.notifications.endActivityMessage(ActivityMessageEndReason.Cancelled) or
by the user clicking the 'Cancel' link.
onActivityMessageUpdatedEvent Static ActivityMessageUpdatedEvent The ActivityMessageUpdatedEvent is fired when an Activity message updates via IModelApp.notifications.outputActivityMessage().  
onInputFieldMessageAddedEvent Static InputFieldMessageAddedEvent    
onInputFieldMessageRemovedEvent Static InputFieldMessageRemovedEvent    
onMessageAddedEvent Static MessageAddedEvent The MessageAddedEvent is fired when a message is added via IModelApp.notifications.outputMessage().  

Defined in

Last Updated: 10 September, 2019