You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Onno Scheffers <on...@piraya.nl> on 2009/06/15 17:26:57 UTC

[T5] Extending Tapestry Fields

I have a TextField component that takes quite a bit of configuration
(several validators are assigned, maxlength is set and the localized label
comes from the database). It doesn't feel right to have to copy the entire
configuration into each page where I use that field.

So I'd like to create my own custom component that does all the
configuration in one place, based on the existing Tapestry TextField.
SubClassing and overriding is not possible since most properties and methods
are either private or package-visible, most are even final).

According to Jira issue 173 (https://issues.apache.org/jira/browse/TAP5-173),
we should use composition instead of subclassing. I'm wondering how to do
that for a TextField that is being referenced from a Label component?


regards,

Onno