/** * Sets the selection state. * * @param selected The selection state. */ @PropertySetter(value = "selected", defaultValue = "false", description = "The selection state.") public void setSelected(boolean selected) { _setSelected(selected, true, true); }
/** * Update the selected item to the specified value. * * @param item Item to be selected. */ protected void _updateSelected(Comboitem item) { if (selected != null) { selected._setSelected(false, true, false); } selected = item; setValue(selected == null ? null : selected.getLabel()); }
/** * Handles change events from the client. * * @param event A change event. */ @EventHandler(value = "change", syncToClient = false, mode = "init") private void _onChange(ChangeEvent event) { _setSelected(defaultify(event.getValue(Boolean.class), true), false, true); event = new ChangeEvent(this.getParent(), this, event.getData(), getLabel()); EventUtil.send(event); }