0 Replies Latest reply on Jun 1, 2011 5:35 AM by Mahin Noufal

    In AbstractTreeDataModel rowIndex must be -1.  setRowIndex

    Mahin Noufal Newbie

      Hi,

      I have an xhtml with this code

      <rich:tree>

      </rich tree>

      It gives the following exception.

       

      java.lang.IllegalArgumentException: In AbstractTreeDataModel rowIndex must be -1.
          at org.richfaces.model.AbstractTreeDataModel.setRowIndex(AbstractTreeDataModel.java:52)
          at org.ajax4jsf.component.UIDataAdaptorBase.setRowIndex(UIDataAdaptorBase.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.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.component.AjaxViewRoot.processRestoreState(AjaxViewRoot.java:761)
          at org.ajax4jsf.application.AjaxStateManager.restoreView(AjaxStateManager.java:456)
          at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:131)
          at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:143)
          at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
          at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
          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:304)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)
      
      

      What should I do? I wanted a tree structure . I tried to implement the same one as in demo site

       

      Thanx in advance.