Hi,

thanks for your help!

You can override isVisible of the component you need to have the visibility switched, and have e.g.:
Hmm, this works. But in my case, I have a panel (which is used in the form) which groups many components and some of them get shown or not. I feel like this should be managed by the panel and not the contained components itself. Overriding the isVisible property by inner classes while creating the component would help, but somehow I don't like the intense use of inner classes (gets hard to read if used a lot)...

you may override Form.onRender() or Form.onComponenTagBody(). First do
your check and set components invisible/visible and than call the
super implementation.
onRender doesn't work because it's a Panel used on a form and Panel.onRender is final. I tried onComponentTag / onComponentTagBody already but in my application a overwritten method like this:

protected void onComponentTagBody(MarkupStream arg0, ComponentTag arg1) {
        link.setVisible(false);
        super.onComponentTagBody(arg0, arg1);
    }

doesn't change the links visibility - it does, when doing something like this in an overwritten onBeginRequest() method.

Regards,
Ralf


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to