2 Replies Latest reply on Feb 11, 2010 7:01 PM by nimo stephan

    message-key in annotation?

    nimo stephan Master

      Does anyone know,


      how I can use message-property-strings in annotation:


      @Pattern(regex="[..]+", message="#{messages['myMsg']}")
      private String test;



      does not replace the message-key with the value in the message-bundle.


      This does also not work:


      @Pattern(regex="[..]+", message=Interpolator.instance().interpolate("#{messages['myMsg']}"))
      private String test;



      any ideas? Is that possible with new JSF 2? Actually, I am using JSF 1.2 and Hibernate Validator.