Igor posted a comment to this bug saying that overriding isVisible() is evil
https://issues.apache.org/jira/browse/WICKET-3171
I was surprised by this and am curious to hear more.
D/
The recommended way since a few 1.4 releases is to override onConfigure()
and call setVisible(true|false) depending on your conditions.
On Mon, Nov 29, 2010 at 4:49 PM, Douglas Ferguson
doug...@douglasferguson.us wrote:
Igor posted a comment to this bug saying that overriding isVisible() is
Can you explain why? We have done this all over the place.
D/
On Nov 29, 2010, at 10:00 AM, Martin Grigorov wrote:
The recommended way since a few 1.4 releases is to override onConfigure()
and call setVisible(true|false) depending on your conditions.
On Mon, Nov 29, 2010 at 4:49 PM,
Hi Douglas,
WICKET-3171 describes a problematic case, where visibility of a
component changes while its form is being processed.
In our projects we're overriding isVisible() where appropriate and never
encountered a similar problem.
I'd say WICKET-3171 is the rare 5% usecase. What's next, is
Niether is evil. It has potential pitfalls, which you should just be
aware of. We use such overrides all over the place and never have
problems with them either. :-) Avoiding it is safer, but also more
verbose (in 1.3.x at least).
Eelco
On Mon, Nov 29, 2010 at 9:49 AM, Igor Vaynberg
To expand, unless I'm missing something (new?), things are really only
problematic when both the mutable value and the override are mixed. In
a way, I think that using the override is 'more pure', as it's a
simple function that is executed when needed, whereas mutable state
can be harder to deal
ive run into plenty of weird problems with overrides, but maybe
because this was in a high concurrency app where data changed
frequently. the problems arise from the fact that the value returned
from isvisible() can change while we are doing traversals, etc.
eg we run a traversal for all visible
how so? we added something new that we think will work better.
-igor
On Mon, Nov 29, 2010 at 12:45 PM, James Carman
ja...@carmanconsulting.com wrote:
On Mon, Nov 29, 2010 at 1:13 PM, Eelco Hillenius
eelco.hillen...@gmail.com wrote:
Niether is evil. It has potential pitfalls, which you should
I am glad we have something new that's better, but going from do
this to this is evil is the troubling part. A lot of us have a lot
of code that is based on the previous advice. Now declaring that code
is evil is kind of scary, especially in the middle of a major
version. If something is evil,
if it works for you keep it. all we did was give you a better/safer alternative.
-igor
On Mon, Nov 29, 2010 at 12:59 PM, James Carman
ja...@carmanconsulting.com wrote:
I am glad we have something new that's better, but going from do
this to this is evil is the troubling part. A lot of us have
Well, in the past, the canned answer was override
isEnabled/isVisible. Changing that paradigm and doing a complete 180
is troubling.
I don't think that's the case though. We've had many discussions on
this list (and in private even), and we've always felt uneasy about
supporting two rather
If wicket was going to be coded over again, would you make
isEnabled and/or isVisible final methods?
Might the non-finality of the methods be deprecated
in some future release?
The majority of the isXXX methods in Component are final.
Richard
--
Quis custodiet ipsos custodes
it has nothing to do with requiring a function to be set. the problem
is that the function is free to change its mind at any moment, but we
rely on it returning the same value during some fixed periods of time.
if we truly want to support isvisible() we would need to cache/memoize
the value
On Mon, Nov 29, 2010 at 7:45 PM, richard emberson
richard.ember...@gmail.com wrote:
If wicket was going to be coded over again, would you make
isEnabled and/or isVisible final methods?
If *I* would do it, I'd probably write it for Scala and lean more
heavily on functions rather than mutable
I'm curious. Which ideas would you steal from SiteBricks and JaxRS?
Juergen
On Tue, Nov 30, 2010 at 5:51 AM, Eelco Hillenius
eelco.hillen...@gmail.com wrote:
On Mon, Nov 29, 2010 at 7:45 PM, richard emberson
richard.ember...@gmail.com wrote:
If wicket was going to be coded over again, would
15 matches
Mail list logo