Wicket checkbox that automatically submits its changed value to domain object
What's the cleanest way I can make a checkbox automatically submit the form it belongs to in Wicket? I don't want to include a submit button at all. The checkbox is backed by a boolean field in a domain object ("Account" in this case). Simplified example with irrelevant parts omitted: EntityModel<Account> accModel = new EntityModel<Account>(Account.class, id); PropertyModel<Boolean> model = new PropertyModel<Boolean>(accModel, "enabled"); CheckBox checkBox = new CheckBox("cb", model); Form form = new Form("form"); form.add(checkBox); add(form); HTML: <form wicket:id="form" id="form" action="">