myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Petracek (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Created] (EXTCDI-204) evaluate injectable resource bundle
Date Fri, 24 Jun 2011 16:21:49 GMT
evaluate injectable resource bundle
-----------------------------------

                 Key: EXTCDI-204
                 URL: https://issues.apache.org/jira/browse/EXTCDI-204
             Project: MyFaces CODI
          Issue Type: Task
          Components: Core
    Affects Versions: 1.0.0
            Reporter: Gerhard Petracek
            Assignee: Gerhard Petracek


e.g.:

@Produces
@MyConfig
protected org.apache.myfaces.extensions.cdi.core.api.ResourceBundle createConfig(org.apache.myfaces.extensions.cdi.core.api.ResourceBundle
injectableResourceBundle) {
  return injectableResourceBundle.baseName("my.custom.bundle");
}

or

@Produces
@MyLabels
protected org.apache.myfaces.extensions.cdi.core.api.ResourceBundle createLabels(@Jsf org.apache.myfaces.extensions.cdi.core.api.ResourceBundle
injectableResourceBundle) {
  return injectableResourceBundle.baseName("my.custom.bundle");
}

... to benefit from the existing local-resolver.

usage:

@Inject
@MyLabels
private ResourceBundle injectableResourceBundle;

this.injectableResourceBundle.getString("myKey");

it would allow to inject resource-bundles in a type-safe manner and it should be a simple
wrapper for java.util.ResourceBundle but without MissingResourceException.

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

        

Mime
View raw message