Sgarlata Matt wrote:

Ted Husted wrote:

IMHO, the "general purpose" parameter has been a useful feature of ActionConfig/ActionMapping and is worth applying elsewhere. We just have to be quick to remind people that if they outgrow the general purpose parameter, then they should start extending the base object and using set-property. (As people often do now.)


I agree; <set-property> is my favorite Struts extension point :) However, I would like to point out that it 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);

What do you think? Would this be a reasonable enhancement request? Can I post it in BugZilla with patches?

Since you have talked about it on the struts-user group, and it looks like the existing system makes your
life harder, then open a Bugzilla request. What ever committer looks at the bug request will determine if the patch will be applied or modified.
[Patches] are always welcome and speed the process ! If possible patch against the current HEAD of struts source
code. Use the diff -u old new. I also like to use 'diff -u 5 old new' just to be sure.


-Rob

--
Robert Leland                   [EMAIL PROTECTED]
------------------------------------------
Java, J2EE, Struts, Web Application Development

804 N. Kenmore Street           +01-703-525-3580
Arlington VA 22201



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to