当我尝试在JSF中呈现多个复选框时,我收到以下异常。关于此的任何线索。
root cause
java.lang.IllegalArgumentException
com.sun.faces.renderkit.SelectItemsIterator.initializeItems(SelectItemsIterator.java:212)
com.sun.faces.renderkit.SelectItemsIterator.hasNext(SelectItemsIterator.java:131)
com.sun.faces.renderkit.html_basic.SelectManyCheckboxListRenderer.encodeEnd(SelectManyCheckboxListRenderer.java:129)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:878)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1620)
javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
以下是我使用此代码的代码
<h:selectManyCheckbox value="#{eBean.oBean.selectedStdItems}" converter="javax.faces.Long">>
<f:selectItems value="{eBean.oBean.stdItems}" var="stdItems" itemLabel="#{stdItems.code}" itemValue="#{stdItems.id}" />
</h:selectManyCheckbox>