Argh, confused setVisible() with setRequired, my bad ;-)
But nevertheless: call setRequiered(condition) in onConfigure().


Thomas Götz wrote:

> Yes, you can also push the state instead of pulling it, which besides is 
> preferrable in terms of efficiency (as onConfigure() is only called once per 
> request whereas isVisible() is potentially called many time):
> TextField<String> textField = new TextField<String>("textField") {
>    @Override
>    protected void onConfigure() {
>        super.onConfigure();
>        setVisible(condition);
>    }
> };
> You can also call textField.setVisible(...) in the Page's or Panel's 
> onConfigure(), but then you need a reference to the textField (property of 
> the page or panel). Or - if possible - you can group your FormComponents into 
> a WebMarkupContainer an set the visibility there.
>   -Tom

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to