title: Datatable selected row on other page
body: <p>I have implement the datatable lazy (<a href="http://www.primefaces.org/showcase/ui/data/datatable/lazy.xhtml" rel="nofollow">http://www.primefaces.org/showcase/ui/data/datatable/lazy.xhtml</a>), it works fine.</p>
  
  <p>Now I want to open a new page when a row is selected. For example, I have to do this :<a href="http://primefaces-rocks.appspot.com/ui/datatableRowSelectionInstant.jsf" rel="nofollow">http://primefaces-rocks.appspot.com/ui/datatableRowSelectionInstant.jsf</a> (the second table).</p>
  
  <p>In my LazyView class, I tried :</p>
  
  <pre><code>try {
              FacesContext.getCurrentInstance().getExternalContext().redirect("carDetails.xhtml?id=" + ((Car) event.getObject()).getId().toString());
          } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  </code></pre>
  
  <p>The carDetail page is showing but values are empty. I don't know how I can get the value of the car in the carDetail.xhtml page...</p>
  
  <p>I also try this code :</p>
  
  <pre><code>public String onRowSelectNavigate(SelectEvent event) {  
          FacesContext.getCurrentInstance().getExternalContext().getFlash().put("selectedCar", event.getObject());  
  
          return "carDetail?faces-redirect=true";  
      }
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>Can someone help me?</p>
  
  <p>Thank's</p>