Package io.jmix.flowui.screen
Class MessageBundle
java.lang.Object
io.jmix.flowui.screen.MessageBundle
Class that provides messages from a message group bound to screen controller.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionformatMessage
(String key, Object... params) Gets localized message from the message group associated with this screen, and uses it as a format string for parameters provided.getMessage
(String key) Gets localized message from the message group associated with this screen.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 screen.- Parameters:
key
- message key- Returns:
- localized message
- See Also:
-
formatMessage
Gets localized message from the message group associated with this screen, 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:
-