Overview
Other MyFaces Extensions
- ExtVal
- Ext-Script
- [Orchestra]
- [Portlet Bridge]
Community
Development
Sponsorship
Your browser does not support iframes
...
... creates a message with the key 'msgKey' as message descriptor.
(The concrete syntax of a key depends on the used MessageResolver. Further details are available in the DevDoc.)
Code Block | ||||
---|---|---|---|---|
| ||||
Message message = messageContext.message().text("Hello {0}").argument("MyFaces").create(); |
...
... creates the message-text based on the constructed message.
To avoid side-effects with other libs as well as IDEs there is no #toString().
Code Block | ||||
---|---|---|---|---|
| ||||
//Message message = messageContext.message().text("Hello {name}").namedArgument("name", "MyFaces").create(); String messageText = message.toString(messageContext); |
... creates the message-text based on the given message and MessageContext
. That's essential if you would like to create the final text with a different/new MessageContext
e.g. with a different configuration or with the current MessageContext
if you receive a de-serialized message instance.
It's possible to register MessageHandler
s which process or forward messages added to the MessageContext
.
...