-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am trying to use ENUM in a Combobox as follows:
<combobox value="@bind(contract.company)"
model="@bind(contract.company)" autodrop="true">
<template name="model">
<comboitem label="@bind(each.name)" value="@bind(each)" />
</template>
</combobox>
ViewModel:
public Company getCompany() {
return company;
}
public void setCompany(final Company company) {
this.company = company;
}
public Company[] getCompany() {
return Company.values();
}
Now I keep getting the following Exceptions:
Caused by: java.lang.IllegalArgumentException: No enum constant m.project.model.enums.Company.AcmeConsulting
The actual ENUM value is Company.ACME_CONSULTING, I am not sure if it is possible to use the ListBox with ENUM.
Asked: 2014-01-17 10:57:30 +0800
Seen: 52 times
Last updated: Jan 18 '14