Navigation problem

UI Components for JSF
Post Reply
skyweb
Posts: 11
Joined: 07 Jun 2011, 15:59

30 Jul 2011, 16:32

Hey, i'm facing a problem when i try to navigate to another page after selecting a datatable's row! when i select the row for the first time it gives me this without geting me redirected to the other page:

Code: Select all

je suis laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa :
30 juil. 2011 14:51:44 org.primefaces.util.ComponentUtils findClientIds
INFO: Cannot find component with identifier ":form:display" in view.
30 juil. 2011 14:51:44 org.primefaces.util.ComponentUtils findClientIds
INFO: Cannot find component with identifier ":form:display" in view.
30 juil. 2011 14:51:44 org.primefaces.util.ComponentUtils findClientIds
INFO: Cannot find component with identifier ":form:display" in view.
and when i select another row from the table it gives me this :

Code: Select all

javax.faces.FacesException: Unexpected error restoring state for component with id j_idt3.  Cause: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0.
   at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:273)
   at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
   at javax.faces.component.UIComponent.visitTree(UIComponent.java:1485)
   at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
   at com.sun.faces.component.visit.VisitUtils.doFullNonIteratingVisit(VisitUtils.java:75)
   at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:257)
   at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:181)
   at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
   at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:448)
   at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
   at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
   at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
   at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)
   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.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
   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:498)
   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:394)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
   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:662)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
   at java.util.ArrayList.RangeCheck(ArrayList.java:547)
   at java.util.ArrayList.get(ArrayList.java:322)
   at javax.faces.component.AttachedObjectListHolder.restoreState(AttachedObjectListHolder.java:165)
   at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1432)
   at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:265)
   ... 37 more
here is my very simple fuction:

Code: Select all

public String reformulation() throws Exception
    {
        System.out.println("je suis laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa : " );
         return "projetdetails";
    }
and here is my datatable's code:

Code: Select all

<p:dataTable id="projets"  var="p" value="#{projet.init()}" selection="#{projet.currentChangerStatus}" onRowSelectUpdate=":mainform:display" rowSelectListener="#{docBean.reformulation()}" onRowSelectComplete="projetDialog.show()"  selectionMode="single">   
    ...........
    ...........
 
         </p:dataTable>  
and finaly my simple navigation case:

Code: Select all

<navigation-rule>
      <from-view-id>/datatablenavigationtest.xhtml</from-view-id>
      <navigation-case>
         <from-outcome>projetdetails</from-outcome>
         <to-view-id>/infoprojet.xhtml</to-view-id>
      </navigation-case>
   </navigation-rule> 
please some help with this coz i'm stuck for 3 days... :?
primefaces-3.0.M1/Netbeans 7/Apach Tomcat 7.0.11

cagatay.civici
Prime
Posts: 17987
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

30 Jul 2011, 16:56

Use a redirect.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: mario.garcia and 15 guests