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?

-Ted.

Matt



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



Reply via email to