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 Thu, 03 Dec 2009 06:52:50 GMT
I accompiished this by a service named ComponentMessagesOverride. The mapped
configuration of the service is used to contribute new paths for component
message catalogs. This service is used in an advise method to override the
result of ComponentMessagesSource#getMessages. This temporary hack is ok for
an application but what is the benefit to do it in tapestry-core? We can
change the implementation of ComponentMessagesSource directly.

On Wed, Dec 2, 2009 at 11:54 PM, Howard Lewis Ship <hlship@gmail.com> wrote:

> This is something I've been meaning to look at as well. I'd like to
> check what I've done for my client to see what I had to hack to
> accomplish this, to ensure that we don't go through a couple of cycles
> of this. I'm working for that client tomorrow, so I'll document that's
> needed then.
>
> I think the entire approach needs to be a bit more pluggable (though
> decorating the service is also an option).
>
>
> On Wed, Dec 2, 2009 at 12:59 PM, Igor Drobiazko
> <igor.drobiazko@gmail.com> wrote:
> > I would like to fix TAP5-915 and have to make ComponentMessagesSource a
> part
> > of the public API. I know we should be reluctant to move services from
> > internal packages but this feature is a must. Tapestry allows you to
> > override almost every part of the framework, but not the message catalog
> of
> > the components. Do you have any objections?
> >
> > The idea is to provide a mapped configuration for the service in which a
> > component class is mapped to a path. In the following example the message
> > catalog of  DateField is obtained from foo/bar/baz and not from
> > /org/apache/tapestry5/corelib/components
> >
> > public void
> > contributeComponentMessagesSource(MappedConfiguration<Class,String>
> > configuration)
> > {
> >     configuration.add(DateField.class, "/foo/bar/baz");
> > }
> >
> > --
> > Best regards,
> >
> > Igor Drobiazko
> > http://tapestry5.de/blog
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de/blog

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