// here we use the choice utility element, it can also return an Iterable, Collection, etc public <TypeOfProperty> get<PropertyName>() { ... } public void set<PropertyName>(<TypeOfProperty> value) { ... } public <TypeOfProperty>[] get<PropertyName>Choice() { ... }
<table>
<select>
<select size="8">
<input type="radio">
<input type="checkbox">
// same as above, can also be an Iterable, Collection, etc public <TypeOfProperty>[] get<PropertyName>() { ... } public void set<PropertyName>(<TypeOfProperty>[] value) { ... } public <TypeOfProperty>[] get<PropertyName>Choice() { ... }
<!-- ListMultipleChoice does not support empty selection once a selection was made --> <select size="8" multiple="multiple">
// Palette allows to go back to empty selection though new GeneratedBinding(this).addBindingInterceptor(new BindingInterceptor() { @Override public Component createSelect(final SelectHtmlElement e) { if (TablesAndChoicesConstants.asMultiselectPalette.equals(e.getWicketId())) { return new ModelPalette(e); } return super.createSelect(e); } }).bind();