+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
|