I have the following addGeneratedColumn:
**myTable.addGeneratedColumn("number", entity -> {**
** RadioButtonGroup<Double> radioField = uiComponents.create(RadioButtonGroup.class);**
** radioField.setOrientation(HasOrientation.Orientation.HORIZONTAL);**
** Map<String, Double> map = new LinkedHashMap<>();**
** map.put("0", 0.0);**
** map.put("0.5", 0.5);**
** map.put("1", 1.0);**
** radioField.setOptionsMap(map);**
** radioField.setValue(map.get("0"));**
** return radioField;**
**});**
Now I need a ClickEvent/OnChangeEvent so I can do validation on the selected radiobutton value.
I’ve tried:
ClickEvent, nothing happens when clicking on radiobutton
CollectionChangeEvent, only fires when loading the container, not when changing the radiobutton value
Table.SelectionEvent, fires when changing radiobutton, however with the old value of the radiobutton, not the new
How can I see which radiobutton is changed and what is the new value.
I also need to know the other data from my table.
Example:
Field1_1 Field2_1 Radiobutton1
Field1_2 Field2_2 Radiobutton2
Field1_3 Field2_3 Radiobutton3
…
If radiobutton1 is changed, I need to know the new value + field1_1 + field2_1