Personally I think mixins combined with workers are one of Tapestry hidden
gems. In my case I need a title on every pagelink . With a mixin applied to
pagelink by a worker I can easily lookup a title in the message catalog and
add it. Maybe 30 minutes of coding and it's automatically applied to every
page link on the site (and in any libraries used).

Contrast that with creating a new component. First pagelink only seems
trivial because it works really well. Secondly I have to refactor the
entire project. Lastly I can't do anything about links in a library.




On Fri, Jun 13, 2014 at 8:22 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Thu, 12 Jun 2014 18:45:21 -0300, Lance Java <lance.j...@googlemail.com>
> wrote:
>
>  Mixins are always a bit harder since you're usually manipulating the dom
>> after the default impl.
>> For something a trivial as pagelink, I'd argue that starting from scratch
>> would be easier.
>>
>
> In this case, I agree. But, as a more general solution, I'd go for a
> mixin. By the way, there's a sadly very much overlooked open source
> library, tapestry-xpath, that helps a lot in Tapestry DOM rewriting.
>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to