Thanks, finally got it to work. By overriding parentPanel.onBeforeRender(), and visit the children I was able to enable/disable child components. It is important to call super.onBeforeRender() before visiting children to populate the ListView first.
I could not use onConfigure() because some of the components that should be enabled/disabled is part of a ListView, and the ListView isn't populated yet when onConfigure is called. -- Einar On Wed, Dec 1, 2010 at 11:12 AM, Wilhelmsen Tor Iver <toriv...@arrive.no>wrote: > > I could override onConfigure in every component, and read the field that > > controls the enabling/disabling, but that would create a lot of > boilerplate > > code for the 80-90% of FormComponents/links that should be disabled. It > > would be a lot cleaner to disable the parent, and only handle the ones I > > want enabled. > > Sounds like you want to use a Component.IVisitor on the parent, which deals > with enanbling/disabling subcomponents based on some state. > > - Tor Iver > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >