posted 8 years ago
Don't even think about it.
Despite some questionable examples by Oracle, JSTL is a horrible fit for JSF. There's nothing in JSTL that JSF doesn't have a better version of in its native framework.
JSF has not been very good about handling enums, in my experience. What I recommend it that you build a SelectItem array with one SelectItem per enum value.
I believe you can do this in a generic way by invoking getEnumConstants on the enum class itself, which will return an array of Enum's. Then allocate a corresponding array of SelectItem and populate it by iterating the enum constants array, constructing a SelectItem from its integer value and display name, then adding that SelectItem to the SelectItem array you just built.
Note that this means that your setValue() method will have to accept an argument of type int, which you will then have to translate back into its corresponding enum (the enum having that ordinal value).
Often the most important part of the news is what they didn't tell.