Note that there are some explanatory texts on larger screens.

plurals
  1. PONumberFormatException PrimeFaces TreeTable
    text
    copied!<p>I am currently working with Primefaces and treetables. My treetable works well except one case. Let me set a little example to explain the problem:</p> <p>The treetable is like this:</p> <ul> <li>Item1.1 <ul> <li>Item2.1 </li> </ul></li> <li>Item1.2 </li> <li>Item1.3</li> </ul> <p>At the beginning, the tree is collapsed. The treetable is defined like this:</p> <pre><code>&lt;p:treeTable id="treetable" value="#{bean.root}" var="node" selectionMode="single" selection="#{bean.selectedNode}"&gt; </code></pre> <p>And I have those ajax calls in it:</p> <pre><code>&lt;p:ajax event="select" listener="#{bean.onSelect}" /&gt; </code></pre> <p>Everything is running well in general. The node selected is updated whatever the level of the node. The problem is with this case:</p> <p>(All is collapsed)</p> <ol> <li>extend Item1.1</li> <li>select Item2.1</li> <li>collapse Item1.1</li> <li>select Item1.2</li> </ol> <p>And here I got the exception:</p> <pre><code>INFO: java.lang.NumberFormatException: For input string: "0,1" java.lang.NumberFormatException: For input string: "0,1" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at org.primefaces.component.api.UITree.findTreeNode(UITree.java:120) at org.primefaces.component.api.UITree.findTreeNode(UITree.java:129) at org.primefaces.component.api.UITree.setRowKey(UITree.java:80) at org.primefaces.component.treetable.TreeTableRenderer.decodeSelection(TreeTableRenderer.java:57) at org.primefaces.component.treetable.TreeTableRenderer.decode(TreeTableRenderer.java:40) at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787) at org.primefaces.component.api.UITree.processDecodes(UITree.java:180) at org.primefaces.component.treetable.TreeTable.processDecodes(TreeTable.java:325) at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:506) at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183) at org.primefaces.component.api.UITree.visitTree(UITree.java:402) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) at javax.faces.component.UIForm.visitTree(UIForm.java:371) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623) at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:376) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:252) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183) at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183) at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931) 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:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload