tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Drobiazko <igor.drobia...@gmail.com>
Subject Re: ComponentMessagesSource to become public API
Date Fri, 04 Dec 2009 06:37:07 GMT
> While here I would like to pose to your attention a use case where i
> found myself repeatedly.
> It happens that I produce a "common" components (like a series of
> Submit components acting togheter) where i want the pages that use it
> to provide the "messages" for labels. So this could be accomplish by
> extending the inheritance of the message catalog from components to
> pages that include the components (or other components as well) to
> application wide catalog.

This would be a nice addition but does not solve the problem. Components are
reusable and their message catalog should be reusable too. I don't want to
provide messages for a component in every page using it. What is needed is
just a "redirect" to another package to look for message catalog.

> So for instance a components could provide defaults labels but pages
> are given the opportunity to override it while leave the "application
> wide" message catalog to have the last word on it.

Now the messages are searched in a low-specific to a most-specific order. If
a component message catalog contains an entry for a particular key the
application wide catalog will be never considered. So you don't have any
chance to override existing translations of a component. For backward
compatibility reasons this behavior should not be changed.

> Does it sounds reasonable?
> Cheers
> --
> Massimo
> http://meridio.blogspot.com
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org

Best regards,

Igor Drobiazko

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message