deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Struberg <strub...@yahoo.de>
Subject Re: [DISCUSS] I18N MessageTemplate
Date Fri, 06 Jul 2012 20:18:38 GMT
EL in config is not easy to understand and most times a real overkill.
Do you have a good use case where this could be needed?

LieGrue,
strub



----- Original Message -----
> From: Gerhard Petracek <gerhard.petracek@gmail.com>
> To: deltaspike-dev@incubator.apache.org
> Cc: 
> Sent: Friday, July 6, 2012 9:52 PM
> Subject: Re: [DISCUSS] I18N MessageTemplate
> 
> hi thomas,
> 
> please have a look at the optional @MessageContextConfig annotation.
> after we have the basic parts, we could add e.g. the spi provided by
> myfaces codi to support el expressions in messages.
> 
> regards,
> gerhard
> 
> 
> 
> 2012/7/5 Thomas Herzog <t.herzog@curecomp.com>
> 
>>  Thomas Herzog <t.herzog@curecomp.com> hat geschrieben:@All
>>  Wouldn't it be fine to use convention over configuration within i18n
>>  module at property keys definition via @MessageTemplate?
>>  I read the user doc and it did not mention it.
>>  Also the oportunity to define a alternativ property file location would be
>>  fine, and to define the supported locales.
>> 
>>  // As in cal10n, Different location for properties file.
>>  @Base("META-INF/messages")
>>  // As cal10n, supported locales, shall be evaluated, if files are present.
>>  @Locales({@Locale("de_DE"), @Locale("en_US")})
>>  class MessageHolder () {
>> 
>>  // Would resolve to property key: MY_KEY
>>  Strin getMyKey();
>>  String myKey();
>> 
>>  // Overwrites convention
>>  @MessageTemplate("ERROR_USER_WRONG")
>>  String getErrorForWrongUserDetected()
>>  }
>> 
>>  Would you aggree?
>>  Is that already possible to define different location of the properties
>>  file and that method names get resolved to property keys without 
> annotation?
>>  One question more, is it possible to access the implementation of the
>>  message resource via EL within the view?
>> 
>> 
> 

Mime
View raw message