You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/01/07 19:28:17 UTC
DO NOT REPLY [Bug 15849] New: -
Incorrect documentation for "Developing Your Own MessageResources Implementation"
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15849>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15849
Incorrect documentation for "Developing Your Own MessageResources Implementation"
Summary: Incorrect documentation for "Developing Your Own
MessageResources Implementation"
Product: Struts
Version: 1.1 Beta 3
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Unknown
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: fineman@alumni.cmu.edu
[ I wasn't sure what component to put this under since the problem is pretty
pervasive ]
Here is a quote from src/share/org/apache/struts/util/package.html:
======================================================================
Create a customized subclass of
org.apache.struts.util.MessageResourcesFactory that will create an
instance of your custom MessageResources class when the
createResources method is called. Note that the "config" argument
to this method can be used to select families of messages in any
manner appropriate to your needs - you are not required to emulate
the "fully qualified Java class name" approach that is used by the
standard PropertyMessageResourcesFactory class.
Tell the MessageResourcesFactory class the name of the
customized MessageResourcesFactory implementation to use
when creating new factory instances.
=======================================================================
There are several places in the Struts code where you see things like:
protected static MessageResources messages =
MessageResources.getMessageResources
("org.apache.struts.taglib.bean.LocalStrings");
This uses the MessageResourcesFactory class that is registered with the
MessageResourcesFactory. It would seem that there are many places in the Struts
code that do, in fact, depend on the Factory emulating the "fully qualified
Java class name" approach.
One solution would be to have all of these MessageResources creations use the
PropertiesMessageResources constructor directly.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>