{"action":"created","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/1729","repository_url":"https://api.github.com/repos/primefaces/primefaces","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/1729/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/1729/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/1729/events","html_url":"https://github.com/primefaces/primefaces/issues/1729","id":173797651,"number":1729,"title":"breadcrumb throws a NumberFormatException when its items have a command but not an id.","user":{"login":"jrcampins","id":11539315,"avatar_url":"https://avatars.githubusercontent.com/u/11539315?v=3","gravatar_id":"","url":"https://api.github.com/users/jrcampins","html_url":"https://github.com/jrcampins","followers_url":"https://api.github.com/users/jrcampins/followers","following_url":"https://api.github.com/users/jrcampins/following{/other_user}","gists_url":"https://api.github.com/users/jrcampins/gists{/gist_id}","starred_url":"https://api.github.com/users/jrcampins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrcampins/subscriptions","organizations_url":"https://api.github.com/users/jrcampins/orgs","repos_url":"https://api.github.com/users/jrcampins/repos","events_url":"https://api.github.com/users/jrcampins/events{/privacy}","received_events_url":"https://api.github.com/users/jrcampins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-29T15:11:03Z","updated_at":"2016-08-29T17:41:01Z","closed_at":null,"body":"I'm using PrimeFaces 6.0 now. I found the problem when I started setting the menu item’s **command** instead of its **URL** or **outcome** (curiously it never happened when all the items had either URL or outcome).\r\n\r\nI followed the code execution using the debugger and I realized that it is trying to get the item position within the breadcrumb converting its **id** to integer (at org.primefaces.component.menu.BaseMenuRenderer.findMenuitem(BaseMenuRenderer.java:89)).\r\n\r\nSo, to work around the problem I simply had to add the following line to the method I use to that add menu items to the breadcrumb's menu model elements list:\r\n\r\n`item.setId(elements.size() + \"\");`\r\n\r\nThis is the exception stack:\r\n\r\n```\r\nSevere:   java.lang.NumberFormatException: For input string: \"\"\r\n\tat java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)\r\n\tat java.lang.Integer.parseInt(Integer.java:592)\r\n\tat java.lang.Integer.parseInt(Integer.java:615)\r\n\tat org.primefaces.component.menu.BaseMenuRenderer.findMenuitem(BaseMenuRenderer.java:89)\r\n\tat org.primefaces.component.menu.BaseMenuRenderer.decode(BaseMenuRenderer.java:67)\r\n\tat javax.faces.component.UIComponentBase.decode(UIComponentBase.java:832)\r\n\tat javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1227)\r\n\tat com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:573)\r\n\tat com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)\r\n\tat javax.faces.component.UIComponent.visitTree(UIComponent.java:1689)\r\n\tat javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)\r\n\tat javax.faces.component.UIForm.visitTree(UIForm.java:371)\r\n\tat javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)\r\n\tat javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)\r\n\tat javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)\r\n\tat javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)\r\n\tat com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403)\r\n\tat com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:266)\r\n\tat org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:57)\r\n\tat javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:927)\r\n\tat com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)\r\n\tat com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)\r\n\tat com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)\r\n\tat javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)\r\n\tat org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)\r\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)\r\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)\r\n\tat org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)\r\n\tat org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)\r\n\tat com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)\r\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)\r\n\tat org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)\r\n\tat org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)\r\n\tat org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:413)\r\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)\r\n\tat com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)\r\n\tat com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)\r\n\tat org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)\r\n\tat org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)\r\n\tat org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)\r\n\tat org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)\r\n\tat org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)\r\n\tat org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)\r\n\tat org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)\r\n\tat org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)\r\n\tat org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)\r\n\tat org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)\r\n\tat org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)\r\n\tat org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)\r\n\tat org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)\r\n\tat org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)\r\n\tat org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)\r\n\tat org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/comments/243196804","html_url":"https://github.com/primefaces/primefaces/issues/1729#issuecomment-243196804","issue_url":"https://api.github.com/repos/primefaces/primefaces/issues/1729","id":243196804,"user":{"login":"jrcampins","id":11539315,"avatar_url":"https://avatars.githubusercontent.com/u/11539315?v=3","gravatar_id":"","url":"https://api.github.com/users/jrcampins","html_url":"https://github.com/jrcampins","followers_url":"https://api.github.com/users/jrcampins/followers","following_url":"https://api.github.com/users/jrcampins/following{/other_user}","gists_url":"https://api.github.com/users/jrcampins/gists{/gist_id}","starred_url":"https://api.github.com/users/jrcampins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrcampins/subscriptions","organizations_url":"https://api.github.com/users/jrcampins/orgs","repos_url":"https://api.github.com/users/jrcampins/repos","events_url":"https://api.github.com/users/jrcampins/events{/privacy}","received_events_url":"https://api.github.com/users/jrcampins/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T17:41:01Z","updated_at":"2016-08-29T17:41:01Z","body":"I forgot to mention an important point. **You'll get the exception clicking a link corresponding to an item without id** (not when the item is added to the breadcrumb)"}}
{"actor":{"display_login":"jrcampins"}}