You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Federico Fanton <ff...@ibc.it> on 2007/08/24 12:08:48 UTC
setEnabled() and complex components
Hi everyone!
I was wondering, is there a way to cleanly enable/disable complex components such as DateFields and Palettes? I see that Component.setEnabled() is final so it cannot be overridden to handle special cases.. Should I always call visitChildren() on the component and setEnabled() on every subcomponent?
(as a side question, why does Wicket make such a wide use of final methods? Doesn't this limit component customisation a lot? Maybe it's because of upgrading concerns?)
Many thanks for your attention!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: setEnabled() and complex components
Posted by Federico Fanton <ff...@ibc.it>.
On Fri, 24 Aug 2007 12:24:46 +0200
Federico Fanton <ff...@ibc.it> wrote:
> > I was wondering, is there a way to cleanly enable/disable complex components such as DateFields and Palettes? I see that Component.setEnabled() is final so it cannot be overridden to handle special cases.. Should I always call visitChildren() on the component and setEnabled() on every subcomponent?
>
> Just noticed that isEnabled isn't final.. Should I ovveride it and call setEnabled on the subcomponents there?
Did that with DateFields and it works, while Palettes subcomponents handle getPalette().isEnabled() on their own.. Problem solved X-) Thanks for the attention all the same!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: setEnabled() and complex components
Posted by Federico Fanton <ff...@ibc.it>.
On Fri, 24 Aug 2007 12:08:48 +0200
Federico Fanton <ff...@ibc.it> wrote:
> I was wondering, is there a way to cleanly enable/disable complex components such as DateFields and Palettes? I see that Component.setEnabled() is final so it cannot be overridden to handle special cases.. Should I always call visitChildren() on the component and setEnabled() on every subcomponent?
Just noticed that isEnabled isn't final.. Should I ovveride it and call setEnabled on the subcomponents there?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org