Hi all,
I'm playing around with the JsfMessage<T> functionality of the JSF module.
I tried to create a custom MessageInterpolator and needed to put a Qualifer
on my version before the application deploys on the container.
It is perfectly correct since the default class,
DefaultMessageInterpolator, is also a CDI bean and injected into the
MessageContextProducer.
But it feels strange that a class which is configured in an annotation by
its class name, needs a qualifier, like the *
MessageFormatMessageInterpolator*.
*@MessageBundle
@MessageContextConfig(messageSource =
{"org.apache.deltaspike.example.message.ApplicationMessages"},
messageInterpolator = MessageFormatMessageInterpolator.class)
public interface CustomizedMessages
{*
This is also the case for a custom LocaleResolver and a custom
MessageResolver.
So do we need to change this or is it ok?
1) Define a Qualifier and annotate the default MessageInterpolator with
it. This way the developer can create a custom version that doesn't need
the qualifier.
2) Define the Qualifier in the jsf module so that not every developer needs
to define a new Qualifier when he needs some custom component when working
with modules
3) We don't need to do anything because custom versions are the exception.
Other point?
My idea
1) +1
Regards
Rudy