Uploaded image for project: 'Solder'
  1. Solder
  2. SOLDER-115

Load the MessageBundle from expression language

    Details

    • Type: Feature Request
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0.0.Final
    • Fix Version/s: Future
    • Component/s: Core
    • Labels:
      None
    • Environment:
      MessageBundle in Seam api 3.0.1-SNAPSHOT

      Description

      Could be useful some automatism for expression language when you use an interface as:

      @MessageBundle
      public interface Mymessages

      { @Message("ettete") String unastringa(); }

      The one manner I've found to call it inside a view through expression language is on theese three steps:

      1 - rename the method unastringa transforming it in a getter method: getUnastringa

      2 - create a backing bean or use a bean marked with the @Named annotation:

      @Named
      public class Search {

      @Inject @MessageBundle
      Mymessages mymessages;

      public Mymessages getMymessages()

      { return mymessages; }

      }

      3 - call it inside a view with the expression:

      #

      {search.mymessages.unastringa}

      I tried too to call it directly as Resource Bundle creating the files Mymessages.i18n_*.properties and generating automatically the implementation classes but the double dot in the name of the files generates a classloading problem.

      Could be nice load the messages through an expression language like: #

      {mymessages.unastringa}

      without pass in theese steps maybe working during the creation of the implementation classes so:

      1 - add automatically getter methods

      2 - add automatically the annotation @Named("interface_name_with_language")

        Gliffy Diagrams

          Activity

          sviluppatorefico Luca Stancapiano created issue -
          shane.bryzak Shane Bryzak made changes -
          Field Original Value New Value
          Fix Version/s Future [ 12316205 ]
          Fix Version/s 3.0.1.Beta1 [ 12316203 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              sviluppatorefico Luca Stancapiano
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development