You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Eelco Hillenius <ee...@gmail.com> on 2007/06/19 23:50:40 UTC

AbstractBehavior#isEnabled(Component component)

AbstractBehavior#isEnabled(Component component) currently returns true
by default. Wouldn't it be better if it was implemented like this?

	public boolean isEnabled(Component component)
	{
		return component.isEnabled();
	}

Behaviors should be ignored when a component is not visible, but some
components like TextFields for instance, can be disabled but still
visible. A concrete case I have here is a disabled textfield with a
datapicker attached, and the datepicker is still visible and worse,
when you use it, you can change the value in the textfield.

Any objections for this change?

Eelco

Re: AbstractBehavior#isEnabled(Component component)

Posted by Eelco Hillenius <ee...@gmail.com>.
Done.

Eelco

On 6/19/07, Igor Vaynberg <ig...@gmail.com> wrote:
> go for it
>
> -igor
>
>
> On 6/19/07, Eelco Hillenius <ee...@gmail.com> wrote:
> >
> > AbstractBehavior#isEnabled(Component component) currently returns true
> > by default. Wouldn't it be better if it was implemented like this?
> >
> >         public boolean isEnabled(Component component)
> >         {
> >                 return component.isEnabled();
> >         }
> >
> > Behaviors should be ignored when a component is not visible, but some
> > components like TextFields for instance, can be disabled but still
> > visible. A concrete case I have here is a disabled textfield with a
> > datapicker attached, and the datepicker is still visible and worse,
> > when you use it, you can change the value in the textfield.
> >
> > Any objections for this change?
> >
> > Eelco
> >
>

Re: AbstractBehavior#isEnabled(Component component)

Posted by Igor Vaynberg <ig...@gmail.com>.
go for it

-igor


On 6/19/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> AbstractBehavior#isEnabled(Component component) currently returns true
> by default. Wouldn't it be better if it was implemented like this?
>
>         public boolean isEnabled(Component component)
>         {
>                 return component.isEnabled();
>         }
>
> Behaviors should be ignored when a component is not visible, but some
> components like TextFields for instance, can be disabled but still
> visible. A concrete case I have here is a disabled textfield with a
> datapicker attached, and the datepicker is still visible and worse,
> when you use it, you can change the value in the textfield.
>
> Any objections for this change?
>
> Eelco
>