Attach an AjaxFormChoiceComponentUpdatingBehavior to the group.
Sven On 11/07/2012 12:02 PM, wicket_new_user wrote:
Hi, I need help on how to incorporate the Javascript function for onclick event in Checkbox Scenario as follows ============== I have 2 checkboxes and this are taken as a Checkbox group private CheckGroup<ModelType> addType(final MarkupContainer parent, final String id, final IModel<ModelCriteriaModel> model) { final CheckGroup<ModelType> result = new CheckGroup<ReportType>(id, new PropertyModel<Set<ModelType>>(model, "model.types")); result.add(new ListView<ModelType>("modelsTypes", Arrays.asList(ModelType.values())) { private static final long serialVersionUID = 1L; /** {@inheritDoc} */ @Override protected void populateItem(final ListItem<ModelType> item) { item.add(new Check<ModelType>("type", item.getModel())); item.add(new Label("name", getLocalizer().getString(String.format("modelType.%s", item .getModelObject().getIdentifier()), getPage()))); } }); parent.add(result); return result; } On clicking of one checkbox, one field needs to be hidden from the form and unselecting, needs to be displayed back can you please help me out -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Checkbox-Onclick-event-usage-tp4653676.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org