XdevCheckBox
The XdevCheckBox is a selection component that can map only two conditions; namely, selected and not selected. The field name is displayed next to the checkbox.
The XdevCheckBox is a form component and can be persisted via XdevFieldGroup.For this, you must link the XdevCheckBox under XdevFieldGroup > Field mapping > Property to an attribute of type Boolean.
Important properties:
Important events:
Data binding:
Data container (model) - Property
A property can be set to implicit using setValue
// Sets the Property checkBox.setValue(true);
or by setting the property of an item as the model. As such, the allocation can be set using the setPropertyDataSource method.
// Gets a property from the SeletcedItem of a Table with "Product" Entities Property<?> itemProperty = this.table.getSelectedItem().getItemProperty("discontinued"); // Sets the Property checkBox.setPropertyDataSource(itemProperty);
Examples:
Read value
Boolean value = checkBox.getValue();
Set value - When “true” is selected, the check mark of the check box is set.
checkBox.setValue(true);Reset check box
checkBox.clear();Allocate focus: Allocates the focus on the XdevInlineDateField. This can trigger a focus event, if necessary.
checkBox.focus();