You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ccordenier <Ch...@atosorigin.com> on 2009/09/25 16:37:17 UTC
MessagesSource and Bundle hierarchy
Hi All,
I have one question about MessagesSource.getMessages(...) method.
Actually, this method uses the bundle id to cache previously build catalog
map messages.
The bundle id is equal to the component class name.
This means if one component is used in one page, and this page is accessed
first. If the component is used in a second page, that component instance
will have the same message bundle hierarchy as the first one.
The key used to store catalog cache should be made of the component class
name AND the top page name ?
Am i right ?
Thanks in advance
--
View this message in context: http://www.nabble.com/MessagesSource-and-Bundle-hierarchy-tp25613257p25613257.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: MessagesSource and Bundle hierarchy
Posted by ccordenier <Ch...@atosorigin.com>.
Sorry,
I have said something wrong, I cannot reproduce this in a single
application.
The problem is specific to my implementation of bundle hierarchy with
per-module catalog.
--
View this message in context: http://www.nabble.com/MessagesSource-and-Bundle-hierarchy-tp25613257p25641702.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: MessagesSource and Bundle hierarchy
Posted by ccordenier <Ch...@atosorigin.com>.
Hi,
I'm sorry to insist, but i would like to have you opinion.
Actually, i'm trying to provide a mechanism that will allow to aggregate an
application from multiple Tapestry5 application bundled in JAR file. JAR
bundle of Tapestry 5 application is a great feature but that means that the
application catalog cannot be used as is because each module can have its
own application catalog.
So i have alias the ComponentMessagesSource service to insert a per-module
catalog in the catalog hierarchy between components and application catalog.
It seams to work but i have found this issue.
If i use a layout component that is shared between modules, if the layout
contains a component that dynamically access to the parent catalog (like for
form labels), then it will find messages for a page contained in the first
module but messages won't be found for a second module.
This is due to the Layout component which is shared between modules and to
its entry in the inner cache mechanism.
By suffixing the key with the top page id, it works. But it also means that
i will have more datas in memory...
Actually because i think this kind of behavior can be reproduced in a single
application, this is why i ask you this question, for exemple Since a layout
contains components that access to the parent catalog dynamically (in our
case this is a breadcrumb component)
ccordenier wrote:
>
> Hi All,
>
> I have one question about MessagesSource.getMessages(...) method.
>
> Actually, this method uses the bundle id to cache previously build catalog
> map messages.
> The bundle id is equal to the component class name.
>
> This means if one component is used in one page, and this page is accessed
> first. If the component is used in a second page, that component instance
> will have the same message bundle hierarchy as the first one.
>
> The key used to store catalog cache should be made of the component class
> name AND the top page name ?
>
> Am i right ?
>
> Thanks in advance
>
--
View this message in context: http://www.nabble.com/MessagesSource-and-Bundle-hierarchy-tp25613257p25641682.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org