Re: extending Select component

2011-04-15 Thread Igor Drobiazko
There is no need to extend the Select component for your use case. Just create an instance of EnumSelectModel [1] and pass it to the Select component. [1] http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/util/EnumSelectModel.html 2011/4/15 Keio Kraaner k.kraa...@gmail.com Hi

Re: extending Select component

2011-04-15 Thread Keio Kraaner
Thanks for the suggestion, Igor. I made up this use case just to keep it very simple. My real question is still the following: is it possible to extend Select (or any other tapestry-core component that extends AbstractField)? - Original Message - From: Igor Drobiazko

Re: extending Select component

2011-04-15 Thread Igor Drobiazko
Of course. Tapestry components are valid Java classes; you can extend any existing component. On Fri, Apr 15, 2011 at 11:43 AM, Keio Kraaner k.kraa...@gmail.com wrote: Thanks for the suggestion, Igor. I made up this use case just to keep it very simple. My real question is still the

Re: extending Select component

2011-04-15 Thread Keio Kraaner
And what about the weird behaviour which results when rendering a child of a Tapestry component? Of course. Tapestry components are valid Java classes; you can extend any existing component. On Fri, Apr 15, 2011 at 11:43 AM, Keio Kraaner k.kraa...@gmail.com wrote: Thanks for the

Re: extending Select component

2011-04-15 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Apr 2011 07:18:14 -0300, Keio Kraaner k.kraa...@gmail.com wrote: And what about the weird behaviour which results when rendering a child of a Tapestry component? Which weird behaviour? Any way, Tapestry-provided components are not meant to be subclassed. It is recommended to

Re: extending Select component

2011-04-15 Thread Keio Kraaner
: Thiago H. de Paula Figueiredo thiag...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Friday, April 15, 2011 2:54 PM Subject: Re: extending Select component On Fri, 15 Apr 2011 07:18:14 -0300, Keio Kraaner k.kraa...@gmail.com wrote: And what about the weird behaviour which results

Re: extending Select component

2011-04-15 Thread Thiago H. de Paula Figueiredo
On Fri, 15 Apr 2011 10:38:10 -0300, Keio Kraaner k.kraa...@gmail.com wrote: The weird behaviour is the following: eash subclass declaration in a tml-file results in 2 rendered fields in output - at first Tapestry renders subclass instance, which is correct, but after this it also renders the

Re: extending Select component

2011-04-15 Thread Christian Köberl
Any way, Tapestry-provided components are not meant to be subclassed. It is recommended to create mixins when possible. Or use composition (not inheritance) - that's usually a good advice in OOP. -- Chris - To unsubscribe,