incubator-adffaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabrielle Crawford <gabrielle.crawf...@oracle.com>
Subject Re: Check for application specific resource bundle before the embedded one
Date Wed, 14 Mar 2007 00:10:52 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
+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.<br>
<br>
<blockquote>The following algorithm must be used to create a
FacesMessage instance given a message<br>
key.<br>
&#9632; Call getMessageBundle() on the Application instance for this web
application,<br>
to determine if the application has defined a resource bundle name. If
so, load that<br>
ResourceBundle and look for the message there.<br>
&#9632; If not there, look in the javax.faces.Messages resource bundle.<br>
</blockquote>
thanks,<br>
<br>
Gab<br>
<br>
On 3/10/2007 11:04 AM, Simon Lessard wrote:
<blockquote
 cite="mid254acf980703101104p44978967g24b982d31bd514e7@mail.gmail.com"
 type="cite">Hello all,
  <br>
  <br>
Currently, LocaleUtils loads resources from the embedded
  <br>
org.apache.myfaces.trinidad.resource.MessageBundle class before
checking for
  <br>
the FacesMessage.FacesMessages bundle, leaving the application specific
  <br>
bundle completely out of the process, effectivelly preventing users
from
  <br>
overloading the predefined Trinidad messages. Currently, the only
workaround
  <br>
for this is the create a class named
  <br>
org.apache.myfaces.trinidad.resource.MessageBundle in your project and
pray
  <br>
for the AS ClassLoader to load it before the jarred one. Therefore, I
think
  <br>
we should add the application defined (in faces-config.xml)
ResourceBundle
  <br>
as the top priority bundle for text resources.
  <br>
  <br>
Any comments?
  <br>
  <br>
  <br>
Regards,
  <br>
  <br>
~ Simon
  <br>
  <br>
</blockquote>
</body>
</html>

Mime
View raw message