在我的管理下,我拥有以下财产:
@ManagedBean
@RequestScoped
public class MrBean {
...
private long[] IDs;
private List<Item> items;
...
}
在我的“xhtml”档案中,我有以下几个箱子:
<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.
请允许我告诉我在这里做了什么错误?
Best regards, James Tran