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, e
On Fri, 15 Apr 2011 10:38:10 -0300, Keio Kraaner
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 parent instance too,
: "Thiago H. de Paula Figueiredo"
To: "Tapestry users"
Sent: Friday, April 15, 2011 2:54 PM
Subject: Re: extending Select component
On Fri, 15 Apr 2011 07:18:14 -0300, Keio Kraaner
wrote:
And what about the weird behaviour which results when rendering a child
of a Tapestr
On Fri, 15 Apr 2011 07:18:14 -0300, Keio Kraaner
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 create mixins when p
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
wrote:
Thanks for the suggestion, Igor.
I made up
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 wrote:
> 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
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"
There is n
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
> Hi
>
> I'm trying to exte
Hi
I'm trying to extend Tapestry's Select component.
My idea is to create EnumSelect class (class EnumSelect extends Select) that
takes an Enum class as a parameter, and based on this creates SelectModel
and ValueEncoder.
Everything works fine, but each EnumSelect in a tml-file results in 2
re