【发布时间】:2013-09-17 13:51:09
【问题描述】:
我正在使用 JSF 2.1.21 和 Icefaces 3.3。如果 f:ajax 的渲染属性中的 id 都在一种形式中,它们的数量是否有限制?如果我使用 4 id,它会引发以下异常。如果我使用 3,我没有问题。所有 4 个组件以及列表框都在一个表单中
<ice:form>
<h:selectOneListbox id="userId" value="#{myViewScopedBean.userId}">
<f:selectItems value="#{myViewScopedBean.userSelectList}" />
<f:ajax execute="@this" render="id1 id2 id3 id4"
listener="#{myReqScopedController.userSelected}"/>
</h:selectOneListbox>
....
</ice:form>
Error Rendering View[/myPage.xhtml]
java.lang.NullPointerException
at org.icefaces.impl.context.DOMPartialViewContext.generateElementUpdateNotifications(DOMPartialViewContext.java:285)
at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:241)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:973)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:413)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1663)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
【问题讨论】:
-
不,没有技术限制。这看起来就像另一个 ICEfaces 错误。
-
如果我渲染了
@form,我看到它正在调用双ajax提交,我用h:form替换了ice:form。我觉得 JSF 2 本身是最好的,至少不是 Icefaces
标签: ajax jsf jsf-2 icefaces icefaces-3