日期:2014-05-18  浏览次数:20675 次

[JSF]求救,SelectItems问题,几天了都未解决!!
我在JSF中不论是用 <h:selectManyListbox> 还是 <h:selectOnuMenu> 都报这样的错误:
16:01:59,343   ERROR   [jsp]:704   -   Servlet.service()   for   servlet   jsp   threw   exception
java.lang.IllegalArgumentException:   "{2} "   Conversion   Error   setting   value   ' '{0} ' '   for   ' '{1} ' '.
    at   com.sun.faces.util.Util.getSelectItems(Util.java:610)
    at   com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:488)
    at   com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:465)
    at   com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:430)
    at   javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
    at   com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:443)
    at   com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
    at   javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
    at   javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:600)
    at   javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:537)
    at   com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
    at   org.apache.jsp.general.createGameTable_jsp._jspx_meth_h_panelGrid_0(createGameTable_jsp.java:319)
    at   org.apache.jsp.general.createGameTable_jsp._jspx_meth_h_form_0(createGameTable_jsp.java:222)
    at   org.apache.jsp.general.createGameTable_jsp._jspService(createGameTable_jsp.java:145)
    at   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    at   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at   org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at   org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
    at   org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
    at   org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at   com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    at   com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
    at   com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at   com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at   com.sun.faces.lifecycle.Lifecyc