title: Selectable Primefaces DataList
body: <p>I am try to select one item of the primefaces datalist. I am following primefaces web site as tutarial. <a href="http://www.primefaces.org/showcase/ui/datagrid.jsf" rel="nofollow">http://www.primefaces.org/showcase/ui/datagrid.jsf</a> (DataList has the same behavior as datagirid) </p>
  
  <p>Here is my codes.</p>
  
  <p>My bean :</p>
  
  <pre><code>@Component
  @Scope("session")
  
  
  public class HomeBean {
  
      @Value("Aranacak kelime giriniz.")
      private String keyword;
      private List&lt;Customer&gt; customers;
      private Customer selectedCustomer;
  
  
  
  
  
  //Setter getters
  }
  </code></pre>
  
  <p>My page :</p>
  
  <pre><code>&lt;p:dataList value="#{homeBean.customers}" var="customer"  &gt;
             &lt;f:attribute name="filter" value="true" /&gt;                    
  
                      &lt;p:commandLink&gt;               
  
                      #{customer.customerName}                     
                      &lt;f:setPropertyActionListener value="#{customer}"  
                              target="#{homeBean.selectedCustomer}" &gt;                   
  
                              &lt;/f:setPropertyActionListener&gt;                                        
                         &lt;/p:commandLink&gt;         
  
  
                  &lt;/p:dataList&gt;
  </code></pre>
  
  <p>the page shows proper values as list have. however, when i try to select one item. it does not work.</p>
  
  <p>Any idea haw can i select a item in the list ?</p>