Hi Mark, Yes I know, but what if you need only for some of your messageBundles a custom version.
Maybe to rare and we don't need to do some special for those cases. rudy On 28 December 2012 21:43, Mark Struberg <[email protected]> wrote: > Hi Rudy! > > If you like to switch over to your version completely then just use an > @Alternative or @Specializes to replace the standard > MessageInterpolator/etc with your own version. > > LieGrue > strub > > > > > ----- Original Message ----- > > From: Rudy De Busscher <[email protected]> > > To: [email protected] > > Cc: > > Sent: Friday, December 28, 2012 9:08 PM > > Subject: Custom MessageInterpolator needs a Qualifer > > > > 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 > > >
