On Tue, 16 Aug 2011 17:38:11 -0300, Andreas Andreou <andre...@gmail.com>
wrote:
Hi,
Hi!
But (there's always a but!), I then noticed that Radio and RadioGroup do
not extend from AbstractField, So, I'm wondering, are there any
particular
reason for this?
Because i see a lot of the AbstractField code being duplicated in
those components (esp. in RadioGroup).
I love refactorings to have less code. :)
I've prepared a diff file that would turn those components into
AbstractFields and it's at
https://gist.github.com/ef2fe45d2396c7c3f6a7
It's mainly deleted code (i think close to 150 lines less)! but (i did
mention there's always a
but, didn't I?) it requires a slight change in AbstractField (the
isDisabled method needs to
lose its final modifier since Radio needs to overwrite it). Is that an
acceptable change?
It's ok to me. I guess it's final to guarantee that the disabled parameter
is always respected. One (bad) option is to leave it as is and create a
protected boolean isNeverDisabled() { return false; } and use it inside
isDisabled().
What do you think? Please let me know if i'm heading in the wrong
direction.
I think you're in the right direction. :) We just need to find out why the
current code is as it is now.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org