ICEfaces
  1. ICEfaces
  2. ICE-11141

ace:dataTable - NumberFormatException: For input string: ""

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P03, EE-4.1.0.GA, EE-3.3.0.GA_P04
    • Fix Version/s: 4.2.BETA, 4.2, EE-3.3.0.GA_P05
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      An ace:dataTable is setup as follows:
       - Uses multiple selection mode.
       - Has an expansionToggler for a panelExpansion component.

      Issue: When using the SHIFT button to select a range of rows the following error is thrown causing the app to crash:

      com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError java.lang.NumberFormatException: For input string: ""
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:504)
      at java.lang.Integer.parseInt(Integer.java:527)
      at org.icefaces.ace.component.datatable.SelectionDeltaState.decodeMultipleSelection(SelectionDeltaState.java:117)
      at org.icefaces.ace.component.datatable.SelectionDeltaState.<init>(SelectionDeltaState.java:55)
      at org.icefaces.ace.component.datatable.DataTableDecoder.decodeSelection(DataTableDecoder.java:43)
      at org.icefaces.ace.component.datatable.DataTableRenderer.decode(DataTableRenderer.java:62)
      at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:832)
      at org.icefaces.ace.component.datatable.DataTable.processDecodes(DataTable.java:468)
      at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:573)
      at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
      at org.icefaces.ace.component.datatable.DataTable.visitTree(DataTable.java:1629)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
      at javax.faces.component.UIForm.visitTree(UIForm.java:371)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
      at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403)
      at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:266)
      at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
      at org.icefaces.impl.context.DOMPartialViewContext.processPartial(DOMPartialViewContext.java:324)
      at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
      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:658)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)

        Issue Links

          Activity

          Hide
          Arran Mccullough added a comment -

          Attached test case.

          Steps:

          • Load welcomeICEfaces.jsf
          • Using the SHIFT key, select a range of rows. The error will be thrown in the server logs and shows an error dialog on the page referencing the error.
          Show
          Arran Mccullough added a comment - Attached test case. Steps: Load welcomeICEfaces.jsf Using the SHIFT key, select a range of rows. The error will be thrown in the server logs and shows an error dialog on the page referencing the error.
          Hide
          Ken Fyten added a comment -

          Note that Arran also reports that using the Ctrl- click to select multiple rows works fine, only the SHIFT-click range select is failing.

          Show
          Ken Fyten added a comment - Note that Arran also reports that using the Ctrl- click to select multiple rows works fine, only the SHIFT-click range select is failing.
          Hide
          Arturo Zambrano added a comment -

          r49307: fix to skip processing ace:panelExpansion <tr> elements when processing multiple selection
          r49308: committed fix to the 3.3 EE maintenance branch

          The issue only happened when there was an ace:panelExpansion in the table. Its <tr> elements don't have an ID format like that of the regular row <tr>'s, so empty string where being returned when processing them, causing parsing exceptions in the server.

          Show
          Arturo Zambrano added a comment - r49307: fix to skip processing ace:panelExpansion <tr> elements when processing multiple selection r49308: committed fix to the 3.3 EE maintenance branch The issue only happened when there was an ace:panelExpansion in the table. Its <tr> elements don't have an ID format like that of the regular row <tr>'s, so empty string where being returned when processing them, causing parsing exceptions in the server.
          Hide
          Arturo Zambrano added a comment -

          r49334: added mechanism to maintain the lastSelectedIndex state during a selection request in order to avoid losing it when the whole table has to be reinitialized on the client
          r49335: committed fix to 3.3 ee maintenance branch

          This was an existing issue. It occurred because of the input fields that JSF inserts at the very first ajax request in a session that cause the whole form to be updated, thus losing some client-side state.

          Show
          Arturo Zambrano added a comment - r49334: added mechanism to maintain the lastSelectedIndex state during a selection request in order to avoid losing it when the whole table has to be reinitialized on the client r49335: committed fix to 3.3 ee maintenance branch This was an existing issue. It occurred because of the input fields that JSF inserts at the very first ajax request in a session that cause the whole form to be updated, thus losing some client-side state.
          Hide
          Carmen Cristurean added a comment -

          Verified ICEfaces4 trunk r49335 with attached test case on IE11, MS Edge38, Chrome53, Firefox47.

          ICEfaces EE-3.3.0-maintenance branch r49335: the above issue is still reproducible on all browsers.

          Show
          Carmen Cristurean added a comment - Verified ICEfaces4 trunk r49335 with attached test case on IE11, MS Edge38, Chrome53, Firefox47. ICEfaces EE-3.3.0-maintenance branch r49335: the above issue is still reproducible on all browsers.
          Hide
          Ken Fyten added a comment -

          Re-opened to backport to the 3.3 maintenance branch.

          Show
          Ken Fyten added a comment - Re-opened to backport to the 3.3 maintenance branch.
          Hide
          Arturo Zambrano added a comment -

          r49354: fixed last issue on the 3.3 maintenance branch

          Show
          Arturo Zambrano added a comment - r49354: fixed last issue on the 3.3 maintenance branch
          Hide
          Carmen Cristurean added a comment - - edited

          Verified EE-3.3.0-maintenance branch r49354 on IE11, FF47, Chrome53 using attached test case.

          Show
          Carmen Cristurean added a comment - - edited Verified EE-3.3.0-maintenance branch r49354 on IE11, FF47, Chrome53 using attached test case.

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Arran Mccullough
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: