ICEfaces
  1. ICEfaces
  2. ICE-8302

IllegalArgumentException thrown when changing the ice:dataTable row attribute

    Details

    • Assignee Priority:
      P2
    • Workaround Exists:
      Yes
    • Workaround Description:
      Add in application code to not render the drop down menu and the paginator when there are no records in the dataTable backing list.

      Description

      An IllegalArgumentException is thrown when dyanmically changing the rows attribute of the ice:dataTable. This occurs only when there is no data (empty table) in the table and a dataPaginator is displayed.

      Here is the stack trace

      java.lang.IllegalArgumentException: -25
      at javax.faces.component.UIData.setFirst(UIData.java:263)
      at com.icesoft.faces.component.datapaginator.DataPaginator.getPageIndex(DataPaginator.java:272)
      at com.icesoft.faces.component.panelseries.UISeries.synchWithPaginator(UISeries.java:705)
      at com.icesoft.faces.component.panelseries.UISeries.encodeBegin(UISeries.java:308)
      at com.icesoft.faces.component.ext.HtmlDataTable.encodeBegin(HtmlDataTable.java:109)
      at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:355)
      at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:95)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:490)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
      at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:495)
      at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:281)
      at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:155)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:51)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:171)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:112)
      at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:65)
      at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:48)
      at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:58)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:77)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:55)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:192)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:67)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at au.gov.wa.commerce.bonds.web.util.filter.RequestParameterServletFilter.doFilter(RequestParameterServletFilter.java:130)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at ...

        Activity

        Arran Mccullough created issue -
        Hide
        Arran Mccullough added a comment -

        Attached test case that shows the issue.

        Steps:

        • load welcomeICEfaces.iface
        • Change the value of the selectOneMenu.
        Show
        Arran Mccullough added a comment - Attached test case that shows the issue. Steps: load welcomeICEfaces.iface Change the value of the selectOneMenu.
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment Case11365Example.zip [ 14637 ]
        Attachment Case11365Example.war [ 14638 ]
        Arran Mccullough made changes -
        Salesforce Case [5007000000MIBye]
        Ken Fyten made changes -
        Fix Version/s EE-1.8.2.GA_P05 [ 10331 ]
        Assignee Priority P2
        Assignee yip.ng [ yip.ng ]
        Evgheni Sadovoi made changes -
        Salesforce Case [5007000000MIBye] [5007000000MIBye, 5007000000MIhiG]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #29721 Wed Jun 27 13:56:10 MDT 2012 yip.ng ICE-8302: IllegalArgumentException thrown when changing the ice:dataTable row attribute.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/datapaginator/DataPaginator.java
        Hide
        yip.ng added a comment - - edited

        JSF getRows() expects an integer, therefore need to change type in bean from String to integer. Otherwise you would get a ClassCastException even before IllegalArgumentException.

        JSF setFirst() throws exception if argument is < 0. Added check for -ve values before call.

        Modified: C:\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\datapaginator\DataPaginator.java
        Completed: At revision: 29721

        Show
        yip.ng added a comment - - edited JSF getRows() expects an integer, therefore need to change type in bean from String to integer. Otherwise you would get a ClassCastException even before IllegalArgumentException. JSF setFirst() throws exception if argument is < 0. Added check for -ve values before call. Modified: C:\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\datapaginator\DataPaginator.java Completed: At revision: 29721
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #29786 Tue Jul 03 10:33:37 MDT 2012 yip.ng ICE-8302: IllegalArgumentException thrown when changing the ice:dataTable row attribute.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/datapaginator/DataPaginator.java
        Hide
        yip.ng added a comment -

        Applied to icefaces3 as well.

        Revision: 29786


        Modified : /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/datapaginator/DataPaginator.java

        Show
        yip.ng added a comment - Applied to icefaces3 as well. Revision: 29786 Modified : /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/datapaginator/DataPaginator.java
        Ken Fyten made changes -
        Fix Version/s 3.1.0.RC1 [ 10337 ]
        Fix Version/s 3.1 [ 10312 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            yip.ng
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: