[seam-issues] [JBoss JIRA] Updated: (SOLDER-115) Load the MessageBundle from expression language

Shane Bryzak (JIRA) jira-events at lists.jboss.org
Mon Sep 12 16:48:26 EDT 2011


     [ https://issues.jboss.org/browse/SOLDER-115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shane Bryzak updated SOLDER-115:
--------------------------------

    Fix Version/s: Future
                       (was: 3.0.1.Beta1)


> Load the MessageBundle from expression language
> -----------------------------------------------
>
>                 Key: SOLDER-115
>                 URL: https://issues.jboss.org/browse/SOLDER-115
>             Project: Seam Solder
>          Issue Type: Feature Request
>          Components: Core
>    Affects Versions: 3.0.0.Final
>         Environment: MessageBundle in Seam api 3.0.1-SNAPSHOT
>            Reporter: Luca Stancapiano
>             Fix For: Future
>
>
> 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")

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list