It would be useful if EasySelectItems could handle
object arrays, as well as maps and collections. So I
added the following 8 lines on to the end of the if
statement in UISelectItems.java#createSelectItems() :
else if (value instanceof Object[]) {
Object[] objects = (Object[]) value;
for (int ix = 0; ix < objects.length; ix++) {
putIteratorToRequestParam(objects[ix]);
items.add(createSelectItem());
removeIteratorFromRequestParam();
}
}
This is useful for making selects out of Enums, since
Enum.getValues() returns an array of objects. Using the
code above you can pass the result of that straight
into EasySelectItems.
Please consider this feature for inclusion!
-Jonathan Harley
jon@parkplatz.net