You can override isVisible of the component you need to have the visibility switched, and have e.g.:

public boolean isVisible()
{
   Foo foo = (Foo)getModelObject();
   return foo.shouldDisplay();
}

Eelco

Ralf Ebert wrote:

Hi,

I'm currently building a form which has some components which are not shown sometimes in dependency of model data. I'm not sure how to build things like that because I found no way to do this in the same way like other model values are bound to the components (propertymodels and ognl expressions). My first idea was to do this myself in the containing form, like in onBeginRequest method, but this didn't worked out very well because the model data can be changed after this by event handlers. What's the wicket way of doing things like that?

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




-------------------------------------------------------
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