return true from wantOnSelectionChangedNotifications and put your visibility changing code in onSelectionChanged
<http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/CheckGroup.html#wantOnSelectionChangedNotifications()> http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/CheckGroup.html#wantOnSelectionChangedNotifications() On Tue, Jun 1, 2010 at 5:37 AM, Iain Reddick <[email protected]>wrote: > Say I have a form with a check box that, when checked, shows some other > field (i.e. it controls the visibility of other form components). > > What is the best approach to handling this? > > From what I understand, you have 3 options: > > 1. Add ajax behaviour to the check box (re-render relevant components). > 2. Add javascript from the Java code (e.g. add some kind of show/hide > behaviour). > 3. Add javascript directly to the HTML. > > What are peoples experiences of the 3 methods, and which is best? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Jeremy Thomerson http://www.wickettraining.com
