Package io.jmix.flowui.view
Class MessageBundle
java.lang.Object
io.jmix.flowui.view.MessageBundle
Class that provides messages from a message group bound to view controller.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionformatMessage
(String key, Object... params) Gets localized message from the message group associated with this view, and uses it as a format string for parameters provided.getMessage
(String key) Gets localized message from the message group associated with this view.void
setMessageGroup
(String messageGroup) Sets source message group.protected void
setMessages
(Messages messages)
-
Field Details
-
messages
-
messageGroup
-
-
Constructor Details
-
MessageBundle
public MessageBundle()
-
-
Method Details
-
setMessages
-
getMessageGroup
- Returns:
- associated message group
-
setMessageGroup
Sets source message group.- Parameters:
messageGroup
- associated message group
-
getMessage
Gets localized message from the message group associated with this view.- Parameters:
key
- message key- Returns:
- localized message
- See Also:
-
formatMessage
Gets localized message from the message group associated with this view, and uses it as a format string for parameters provided.- Parameters:
key
- message keyparams
- parameter values- Returns:
- formatted string or the key in case of IllegalFormatException
- See Also:
-