1 Reply Latest reply on Dec 13, 2012 6:34 AM by Ken Finnigan

    Issue using @MessageBundle with .i18n.properties file

    Alexey Andreev Newbie

      I am trying to configure internationalized messages using the following guide http://docs.jboss.org/seam/3/solder/latest/reference/en-US/html_single/#implementation-classes

      My Idea is to bind @MessageBundle interface with .i18n.properties file.

      However I can't make the configuration work properly.


      I created mypackage.ValidationMessages interface:



      public interface ValidationMessages


          String testMessage();



      In the same package I created the properties file ValidationMessages.i18n.properties

      The file contains a single line:


      testMessage=This is test message


      According to the documentation I would expect that my interface method will be bound to the constant from i18n.properties file.

      But when I try to compile I get an error:


      error: All message bundles and message logger messageMethods must have or inherit a message.


      Which means that I probably should add @Message annotation to my method testMessage().

      When I do that, it compiles fine. But when I use interface ValidationMessages from my beans, I see only the hardcoded text - not from the properties file.


      I would appreciate any advice on how this setup can be configured properly.


      I am using Seam 3.1.0.Final