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

luca stancapiano (JIRA) jira-events at lists.jboss.org
Sun Jul 31 18:18:23 EDT 2011

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: 3.0.1.Beta1

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

public interface Mymessages {
	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:

     public class Search {
	@Inject @MessageBundle
	Mymessages mymessages;
        public Mymessages getMymessages() {
    	    return mymessages;

3 - call it inside a view with the expression:


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