Re: Compoment.setVisible(IModel) ?

2022-03-10 Thread smallufo
Wow , TIL there are already VisibleModelBehavior and EnabledModelBehavior
in the minis package for this.

Thanks


Sven Meier  於 2022年3月10日 週四 下午3:22寫道:

> Hi,
>
> Models are not support for visible/enabled state.
>
> The recommended pattern is overriding onConfigure()
>
> onConfigure() {
>setVisible(/*... lazy evaluated ...*/)
> }
>
> Regards
> Sven
>
>
> On 10.03.22 00:31, smallufo wrote:
> > Currently , component visible is defined by a eager evaluated boolean
> value
> >
> > public final Component setVisible(final boolean visible)
> >
> > Is it able to make it accept IModel ?
> > (so that we can lazy evaluated the value)
> >
> > Thanks.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Compoment.setVisible(IModel) ?

2022-03-09 Thread Sven Meier

Hi,

Models are not support for visible/enabled state.

The recommended pattern is overriding onConfigure()

onConfigure() {
  setVisible(/*... lazy evaluated ...*/)
}

Regards
Sven


On 10.03.22 00:31, smallufo wrote:

Currently , component visible is defined by a eager evaluated boolean value

public final Component setVisible(final boolean visible)

Is it able to make it accept IModel ?
(so that we can lazy evaluated the value)

Thanks.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Compoment.setVisible(IModel) ?

2022-03-09 Thread smallufo
Currently , component visible is defined by a eager evaluated boolean value

public final Component setVisible(final boolean visible)

Is it able to make it accept IModel ?
(so that we can lazy evaluated the value)

Thanks.