Widget that can choose more than one enumerations value

I want to add a widget which function is to choose more than one value that an enumeration have.  Anyone knows something about this question? Thanks
3 answers

It is not possible to select multiple values of an enumeration. An object with an enumeration attribute can only store one value of that enumeration. If you want the user to be able to select multiple values, you'll have to rebuild your domain model a little.

If there's a limited number of options (that are not likely to change), you can opt to add a boolean value for each checkbox. Alternatively, you can add a new entity that stores possible values in the database (so for instance, if you have a company that is present in multiple regions, you could make a “Region” entity and create objects in your database for each region, and then associate the company to the applicable regions).


Refer the same question: 



It also depends on where you want to do that. By default, in datagrid, if you have search drop down, you can do that.

But you can not do the same from forms where you create or edit.


“More than one” and “Enumeration” don’t mix. Try assigning labels or something, if you want to combine. Enumerations are for those occasions when there’s only one right answer, like in categories, species, genders, colors … where there’s no combination. In that case, a drop-down is good.


With the labels, however, you can combine. Like in words of interest underneath a blog: “lifestyle”, “fashion”, “family”.