incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: Check for application specific resource bundle before the embedded one
Date Wed, 14 Mar 2007 02:10:45 GMT
I guess +1  The spec only truly requires this for messages
that are created by the JSF implementation, but it's common
practice to apply this to other messages.

-- Adam


On 3/13/07, Gabrielle Crawford <gabrielle.crawford@oracle.com> wrote:
>
>  +1 This seems to match the spec, which defines the algorithm below, so we'd
> just use org.apache.myfaces.trinidad.resource.MessageBundle
> instead of javax.faces.Messages.
>
>
> The following algorithm must be used to create a FacesMessage instance given
> a message
>  key.
>  ■ Call getMessageBundle() on the Application instance for this web
> application,
>  to determine if the application has defined a resource bundle name. If so,
> load that
>  ResourceBundle and look for the message there.
>  ■ If not there, look in the javax.faces.Messages resource bundle.
>  thanks,
>
>  Gab
>
>
>  On 3/10/2007 11:04 AM, Simon Lessard wrote:
> Hello all,
>
>  Currently, LocaleUtils loads resources from the embedded
>  org.apache.myfaces.trinidad.resource.MessageBundle class
> before checking for
>  the FacesMessage.FacesMessages bundle, leaving the application specific
>  bundle completely out of the process, effectivelly preventing users from
>  overloading the predefined Trinidad messages. Currently, the only
> workaround
>  for this is the create a class named
>  org.apache.myfaces.trinidad.resource.MessageBundle in your
> project and pray
>  for the AS ClassLoader to load it before the jarred one. Therefore, I think
>  we should add the application defined (in faces-config.xml) ResourceBundle
>  as the top priority bundle for text resources.
>
>  Any comments?
>
>
>  Regards,
>
>  ~ Simon
>
>
Mime
View raw message