I ran into this problem when trying to bind a combo-box to my model. The enum values are null when they are submitted to my endpoint class in the backend.
<vaadin-combo-box label="identifier type" id="identifier_type"
${field(this.binder.model.entity.identification.idType)}
.items="${Object.values(KeyType)}">
</vaadin-combo-box>
The Java enum looks like this:
public enum KeyType {
CUSTOM("Custom"),
IRDI("IRDI"),
IRI("IRI"),
IDSHORT("IdShort"),
FRAGMENTID("FragmentId");
...
}
But the generated ts enum looks like this:
enum KeyType {
CUSTOM = 'CUSTOM',
IRDI = 'IRDI',
IRI = 'IRI',
IDSHORT = 'IDSHORT',
FRAGMENTID = 'FRAGMENTID',
}
All values are changed to uppercase, which is why the binder fails to match the ones which have camel case writing, which results in a null value for the field.
Can this be configured, is this by design, or is this a bug?
Thanks&BR Daniel