Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • MessageResolver
  • MessageInterpolator
  • LocaleResolver
  • MessageHandler
  • FormatterFactory
  • Formatter
  • Formatter-Config
Note
titleHint

The message module isn't aware of CDI APIs. Therefore, it's possible to use it outside a CDI container in any Java based application. However, if you directly inject an artifact of the message-module in a CDI bean, a dependent scoped instance will be created by default. That means a custom producer is needed to change the configuration and scope it in the scope of your choice. Otherwise the configuration would just change the dependent instance -> configuration via any kind of startup-listeners won't work.

MessageResolver

A message-resolver is responsible for creating the message-text based on the message-descriptor (key or inline-text), the current locale (and in some cases the message-payload).
(The supported format e.g. if it's required to escape a key, if inline-text is supported,... depends on the concrete implementation.)
In case of a message-key, the message-resolver has to transform it to the message-text by looking it up in a message source like a resource-bundle. The JSF module of MyFaces CODI will provide a default implementation which uses the configured application message bundle as message source. However, usually it's required to provide an implementation in every project (because the impl. is aware of the message-source).

...