title: PrimeFaces picklist control usage
body: <p>I'm using PrimeFaces' pickList component in my project. But the problem is the the action function is never called.</p>
  
  <pre><code>&lt;p:pickList id="pickList" value="#{pickListBean.names}" var="name"
      itemLabel="#{name}itemValue="#{name}" /&gt;
  &lt;p:commandButton ajax="false" id="submit" value="Submit" type="submit"
      action="#{pickListBean.performAction}" /&gt;
  </code></pre>
  
  <p>My managed bean is given in the following:</p>
  
  <pre><code>@ManagedBean(name="pickListBean")
  @SessionScoped
  public class PickListBean {
  private DualListModel&lt;String&gt; names;
  private List&lt;String&gt; nam1;
  private List&lt;String&gt; nam2;
  
  public PickListBean() {
      nam1 = new ArrayList&lt;String&gt;();
      nam2 = new ArrayList&lt;String&gt;();
  
      nam1.add("Ammar");
      nam1.add("Nisar");
      nam1.add("Khalid");
      nam1.add("Haris");
      nam1.add("Yasir");
  
      names = new DualListModel&lt;String&gt;(nam1, nam2);
  }
  
  public DualListModel&lt;Player&gt; getPlayers() {
      return players;
  }
  public void setPlayers(DualListModel&lt;Player&gt; players) {
      this.players = players;
  }
  
  public DualListModel&lt;String&gt; getNames() {
      return names;
  }
  public void setNames(DualListModel&lt;String&gt; names) {
      this.names = names;
  }
  
  public String performAction()
  {
      for (Iterator iterator = nam2.iterator(); iterator.hasNext();) {
          String name = (String) iterator.next();
          System.out.print("\t" + name);
      }
      return "";
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I'll be thankful for help.</p>