In my ManagedBean, I have the following property:
@ManagedBean @RequestScoped public class MrBean { ... private long[] IDs; private List<Item> items; ... } In my .xhtml file, I have the following select many box:
<h:selectManyListbox label="abc" id="abc" size="5" value="#{MrBean.IDs}"> <f:selectItems value="#{MrBean.items}" var="i" itemLabel="#{i.name}" itemValue="#{i.id}" /> </h:selectManyListbox> <h:message styleClass="errorMsg" for="abc" /> The id of my items are long numbers. Hence, I expected that I would get a list of IDs chosen. However, when I submit the form, abc: Validation Error: Value is not valid appears in the message part for my list box.
Can someone please tell what I have done wrong here?
Best regards, James Tran