9 Replies Latest reply on Sep 5, 2007 5:55 AM by maksimkaszynski

    Problem "setRowIndex" with scrollableDataTable

      I'm facing problem with "scrollableDataTable", my simple code:

      
      <rich:scrollableDataTable
       id="dataTable1"
       rowKeyVar="rkv"
       rows="5"
       value=""
       height="166px"
       width="750px"
       frozenColCount="1"
       >
      
       <rich:column id="column1">
      
       <f:facet name="header">
       <h:outputText id="inceptionDateOutputText" value="TESTE 1" />
       </f:facet>
       </rich:column>
      
       <rich:column id="column2">
      
       <f:facet name="header">
       <h:outputText id="format2_outputtext" value="TESTE 2"/>
       </f:facet>
       </rich:column>
      
       </rich:scrollableDataTable>
      
      


      Error:

      java.lang.UnsupportedOperationException: setRowIndex
       at org.richfaces.model.ScrollableTableDataModel.setRowIndex(ScrollableTableDataModel.java:179)
       at org.richfaces.model.DataModelCache.setRowIndex(DataModelCache.java:164)
       at org.ajax4jsf.component.UIDataAdaptor.setRowIndex(UIDataAdaptor.java:270)
       at javax.faces.component.UIData.encodeEnd(UIData.java:572)
       at org.richfaces.component.UIScrollableDataTable.encodeEnd(UIScrollableDataTable.java:364)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:237)
       at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      


      somebody knows what is the problem or It's a bug??

      Any one could help me ?

        • 1. Re: Problem
          maksimkaszynski

           

          http://jira.jboss.com/jira/browse/RF-782


          fixed

          • 2. Re: Problem
            binhulito

            before setRowIndex now is the getRowIndex!
            somebody knows what is the problem or It's a bug??

            Helpss...

            <rich:scrollableDataTable id="scrollList" rows="5" width="400" height="200" var="services" value="#{wServicesEmpresaMB.servicesEmpresaList}">
             <f:facet name="header">
             <rich:columnGroup>
             <h:column>
             <h:outputText value="Nome"/>
             </h:column>
             <h:column>
             <h:outputText value="Descrição"/>
             </h:column>
             <h:column>
             <h:outputText value="URL"/>
             </h:column>
             <h:column>
             <h:outputText value="Status"/>
             </h:column>
             <h:column>
             <h:outputText value="Detalhes"/>
             </h:column>
             </rich:columnGroup>
             </f:facet>
             <h:column>
             <h:outputText value="#{scrollList.strWServicesEmpresaNome}"/>
             </h:column>
             <h:column>
             <h:outputText value="#{scrollList.strWServicesEmpresaDesc}"/>
             </h:column>
             <h:column>
             <h:outputText value="#{scrollList.strWServicesEmpresaUrlWs}"/>
             </h:column>
             <h:column>
             <h:outputText value="Ativo" rendered="#{scrollList.strWServicesEmpresaStatus==1}"/>
             <h:outputText value="Bloqueado" rendered="#{scrollList.strWServicesEmpresaStatus==2}"/>
             </h:column>
             <h:column>
             <h:graphicImage url="#{pageContext.request.contextPath}/images/detalhes.gif" style="cursor:pointer;">
             <a4j:support event="onclick" action="#{wServicesEmpresaMB.editar}" reRender="Painel,form0"/>
             </h:graphicImage>
             </h:column>
            </rich:scrollableDataTable>



            type Exception report
            
            message
            
            description The server encountered an internal error () that prevented it from fulfilling this request.
            
            exception
            
            javax.servlet.ServletException: getRowIndex
             javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
             org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
             org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
             org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
            
            root cause
            
            javax.faces.FacesException: getRowIndex
             org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
             org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
             org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:76)
             org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
             org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:237)
             org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
             org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
             javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
             org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
             org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
             org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
            
            note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.


            • 3. Re: Problem
              binhulito

               

              "binhulito" wrote:
              before setRowIndex now is the getRowIndex!
              somebody knows what is the problem or It's a bug??

              Helpss...

              <rich:scrollableDataTable id="scrollList" rows="5" width="400" height="200" var="services" value="#{wServicesEmpresaMB.servicesEmpresaList}">
               <f:facet name="header">
               <rich:columnGroup>
               <h:column>
               <h:outputText value="Nome"/>
               </h:column>
               <h:column>
               <h:outputText value="Descrição"/>
               </h:column>
               <h:column>
               <h:outputText value="URL"/>
               </h:column>
               <h:column>
               <h:outputText value="Status"/>
               </h:column>
               <h:column>
               <h:outputText value="Detalhes"/>
               </h:column>
               </rich:columnGroup>
               </f:facet>
               <h:column>
               <h:outputText value="#{services.strWServicesEmpresaNome}"/>
               </h:column>
               <h:column>
               <h:outputText value="#{services.strWServicesEmpresaDesc}"/>
               </h:column>
               <h:column>
               <h:outputText value="#{services.strWServicesEmpresaUrlWs}"/>
               </h:column>
               <h:column>
               <h:outputText value="Ativo" rendered="#{services.strWServicesEmpresaStatus==1}"/>
               <h:outputText value="Bloqueado" rendered="#{services.strWServicesEmpresaStatus==2}"/>
               </h:column>
               <h:column>
               <h:graphicImage url="#{pageContext.request.contextPath}/images/detalhes.gif" style="cursor:pointer;">
               <a4j:support event="onclick" action="#{wServicesEmpresaMB.editar}" reRender="Painel,form0"/>
               </h:graphicImage>
               </h:column>
              </rich:scrollableDataTable>



              type Exception report
              
              message
              
              description The server encountered an internal error () that prevented it from fulfilling this request.
              
              exception
              
              javax.servlet.ServletException: getRowIndex
               javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
               org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
               org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
               org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
              
              root cause
              
              javax.faces.FacesException: getRowIndex
               org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
               org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
               org.jenia.faces.template.handler.ViewHandler.renderView(ViewHandler.java:76)
               org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
               org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:237)
               org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
               org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
               javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
               org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
               org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
               org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
              
              note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.


              • 4. Re: Problem
                maksimkaszynski

                Sorry. Fixed. In svn.

                • 5. Re: Problem

                  I'm facing the same problem, when I click row...

                  see exception:

                  java.lang.UnsupportedOperationException: getRowIndex
                   at org.richfaces.model.ScrollableTableDataModel.getRowIndex(ScrollableTableDataModel.java:165)
                   at org.richfaces.model.DataModelCache.getRowIndex(DataModelCache.java:132)
                   at org.ajax4jsf.component.UIDataAdaptor.getRowIndex(UIDataAdaptor.java:286)
                   at javax.faces.component._ComponentUtils.idsAreEqual(_ComponentUtils.java:132)
                   at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:108)
                   at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:105)
                   at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:105)
                   at javax.faces.component._ComponentUtils.findComponent(_ComponentUtils.java:105)
                   at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:414)
                   at org.ajax4jsf.context.AjaxContextImpl.findComponentFor(AjaxContextImpl.java:612)
                   at org.ajax4jsf.context.AjaxContextImpl.convertId(AjaxContextImpl.java:594)
                   at org.ajax4jsf.context.AjaxContextImpl.addRegionsFromComponent(AjaxContextImpl.java:564)
                   at org.ajax4jsf.component.AjaxActionComponent.setupReRender(AjaxActionComponent.java:101)
                   at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:66)
                   at org.ajax4jsf.component.UIInclude.broadcast(UIInclude.java:138)
                   at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
                   at org.ajax4jsf.component.AjaxViewRoot.broadcastAjaxEvents(AjaxViewRoot.java:206)
                   at org.ajax4jsf.application.AjaxViewHandler.processAjaxEvents(AjaxViewHandler.java:278)
                   at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:234)
                   at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
                   at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
                   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
                   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                  


                  Thank's a lot, maksimkaszynski.




                  • 6. Re: Problem
                    maksimkaszynski

                    Did you update richfaces sources to the latest revision?
                    Before writing my last post I removed all unsupported operation exception from data model.

                    • 7. Re: Problem

                      Yes...

                      I'm using the version RichFaces 3.1.0-rc 4...

                      • 8. Re: Problem

                         

                        "*Ninho*" wrote:
                        Yes...

                        I'm using the version RichFaces 3.1.0-rc 4...


                        but the problem continue...

                        • 9. Re: Problem
                          maksimkaszynski

                          That explains why you didn't get the latest fixes.
                          Today will be RC5 - it contains fixes.