Hi Martin,

In that specific case (the AdminCentralPage), the context attribute is not even used. Go to AdminCentralPage.getMessages() (which is what is called you the template does ${this.messages}) and go up the stack from there, you should see it just uses the default message bundle, but not the context attribute.

On the top of my head, I'm not exactly sure where this is used, but I suspect it's not in the admincentral pages, but rather in things jsp's or the taglibs.

-g

On Nov 26, 2008, at 9:36 AM, Martin Algesten wrote:



Hi,

I mailed on the user list about my <fmt:message> tags getting shafted when introducing Magnolia in my already existing webapp. I want to work out a fix, but thought it best to discuss it first.

The problem is MessagesManager.init() row 150:

context.setAttribute(Config.FMT_LOCALIZATION_CONTEXT, MessagesManager.DEFAULT_BASENAME);

This sets the basename to 'info.magnolia.module.admininterface.messages' for the whole webapp, not just Magnolia (magnolia-core having a reference to admininterface is perhaps untidy in itself).

This could be solved using the same principles as <fmt:bundle> <fmt:setBundle>. Basically rather than setting the basename for the whole webapp, we can set the basename for the page being rendered. Looking at the pages we have statements like:

${this.messages.get("central.bugFeatureRequest")}

The solution I would try to work out would make sure this.messages is set appropriately just when rendering the admin interface pages, rather than being something default for the webapp and then remove the context.setAttribute(). Sounds reasonable?

Martin


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
----------------------------------------------------------------

Reply via email to