6 Replies Latest reply on Sep 10, 2010 5:42 AM by Ilya Shaikovsky

    Rich Tree RowIndex error

    krikor herlopian Newbie
      <rich:panel id="dynamicTreePanel" header="Dynamic Tree User Interface">
              <rich:tree  icon="/skins/mycompany/skin_images/plus.GIF" iconLeaf="/skins/mycompany/skin_images/plus.GIF">
                         
                <rich:recursiveTreeNodesAdaptor  roots="#{menu.menuList}" var="_rootOrganisation">
                  <rich:treeNode >
                    <h:outputText value="#{_rootOrganisation.objectName}"/>
                  </rich:treeNode>
                             
                  <rich:recursiveTreeNodesAdaptor roots="#{_rootOrganisation.children}"
                      var="_childOrganisation" nodes="#{_childOrganisation.children}">
                                 
                    <rich:treeNode>
                      <h:outputText value="#{_childOrganisation.objectName}"/>
                    </rich:treeNode>
                  </rich:recursiveTreeNodesAdaptor>
                </rich:recursiveTreeNodesAdaptor>
              </rich:tree>
            </rich:panel>

       

      I get the following error when i click on a node to expand.


      17:19:04,720 ERROR [org.ajax4jsf.webapp.BaseXMLFilter] Exception in the filter chain: javax.servlet.ServletException: In AbstractTreeDataModel rowIndex must be -1.
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:336)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:872)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
          at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: In AbstractTreeDataModel rowIndex must be -1.
          at org.richfaces.model.AbstractTreeDataModel.setRowIndex(AbstractTreeDataModel.java:52)
          at org.ajax4jsf.component.UIDataAdaptor.setRowIndex(UIDataAdaptor.java:289)
          at javax.faces.component.UIData.visitColumnsAndRows(UIData.java:1544)
          at javax.faces.component.UIData.visitTree(UIData.java:1212)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIForm.visitTree(UIForm.java:333)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:869)
          at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:439)
          at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
          at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
          at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107)
          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
          ... 23 more

       

      17:19:04,724 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/MenuTrees].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalArgumentException: In AbstractTreeDataModel rowIndex must be -1.
          at org.richfaces.model.AbstractTreeDataModel.setRowIndex(AbstractTreeDataModel.java:52)
          at org.ajax4jsf.component.UIDataAdaptor.setRowIndex(UIDataAdaptor.java:289)
          at javax.faces.component.UIData.visitColumnsAndRows(UIData.java:1544)
          at javax.faces.component.UIData.visitTree(UIData.java:1212)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIForm.visitTree(UIForm.java:333)
          at javax.faces.component.UIComponent.visitTree(UIComponent.java:1457)
          at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:869)
          at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:439)
          at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
          at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
          at org.ajax4jsf.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:107)
          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:199)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:336)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:872)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
          at java.lang.Thread.run(Thread.java:619)