我在 4.0-RC1 中发现了 p:treeTable 的问题。从树中以编程方式删除节点时,在此之后的所有单击都会引发 NumberFormatException。我认为这个问题已解决(问题 6007 https://code.google.com/p/primefaces/issues/detail?id=6007&q=treetable&colspec=ID%20Type%20Status%20Priority%20TargetVersion%20Reporter%20Owner%20Summary)这就是我升级到4.0的原因。但是,那里似乎还有另一个错误:
18-Oct-2013 10:00:23 com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
WARNING: java.lang.NumberFormatException: For input string: "7,0"
javax.faces.FacesException: java.lang.NumberFormatException: For input string: "7,0"
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:270)
at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:57)
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:927)
at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NumberFormatException: For input string: "7,0"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:458)
at java.lang.Integer.parseInt(Integer.java:499)
at org.primefaces.component.api.UITree.findTreeNode(UITree.java:156)
at org.primefaces.component.api.UITree.findTreeNode(UITree.java:168)
at org.primefaces.component.api.UITree.findTreeNode(UITree.java:168)
at org.primefaces.component.api.UITree.findTreeNode(UITree.java:168)
at org.primefaces.component.api.UITree.setRowKey(UITree.java:87)
at org.primefaces.component.treetable.TreeTableRenderer.decodeSelection(TreeTableRenderer.java:59)
at org.primefaces.component.treetable.TreeTableRenderer.decode(TreeTableRenderer.java:42)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:831)
at org.primefaces.component.api.UITree.processDecodes(UITree.java:294)
at org.primefaces.component.treetable.TreeTable.processDecodes(TreeTable.java:291)
at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:550)
at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
at org.primefaces.component.api.UITree.visitTree(UITree.java:552)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at javax.faces.component.UIForm.visitTree(UIForm.java:371)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1740)
at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:399)
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:263)
... 18 more