Hello there,
I am having a problem when selecting enums inside a LookupField, which is wrapped in a FieldGroup.
I have around 20 enum values defined, however, Cuba does only accept the first 10 entries.
When I select the 11th entry, it selects the first entry.
When I attach a ValueChangedListener like this:
lookupField.addValueChangeListener(new ValueChangeListener() {
@Override
public void valueChanged(ValueChangeEvent e) {
showMessageDialog("Value difference", e.getPrevValue() + " and new: " + e.getValue(), MessageType.CONFIRMATION);
}
});
it correctly identifies the previous value but the new value is already the wrong one.
Example:
I have an enumeration of countries:
- Germany
- US
- UK
- Austria
- Switzerland
- Denmark
- Poland
- Estonia
- Latvia
- Finland
- Norway
I select the 10th entry, which is Finland, and then select the 11th entry (Norway) the message reads as: “FINLAND an new: GERMANY” (Germany is the 1st entry in the list).
I wasn’t able to find any method which overrides the default behaviour for selecting the index, is there any?
How do I work around this?
Greetings