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=22486>. 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=22486 [PATCH] Give MessageResources a reference to MessageResourcesConfig Summary: [PATCH] Give MessageResources a reference to MessageResourcesConfig Product: Struts Version: Nightly Build Platform: All OS/Version: All Status: NEW Severity: Enhancement Priority: Other Component: Utilities AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The <set-property> element doesn't work very well for the <message-resources> element. The reason for this is that <set-property> populates a MessageResourcesConfig object instead of the actual MessageResources object. Then in the ActionServlet, when the MessageResources object is initialized it is passed the "parameter" information but is not passed any <set-property> information: // here the resources are created, and passed the parameter MessageResources resources = factoryObject.createResources(mrcs[i].getParameter()); // here the resources are passed the return null info resources.setReturnNull(mrcs[i].getNull()); //!! here I think we should pass the MessageResourcesConfig getServletContext().setAttribute( mrcs[i].getKey() + config.getPrefix(), resources); The patch I will attach in a moment adds resources.setMessageResourcesConfig to ActionServlet where I put //!! in the comments. To support this behavior, I introduced a protected messageResourcesConfig object (with getters and setters) to MessageResources. Food for thought - will commons-resources support behavior like this, where the resources know their configuration information? I looked through the javadoc as best I could but I couldn't tell. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]