title: Primefaces picklist target and source values do not change
body: <p>My primefaces pickList source and target values do not change, I have followed the example in <a href="http://www.primefaces.org/showcase-labs/ui/picklist.jsf" rel="nofollow">primefaces showcase</a>
  and also looked at several posts here but still am not able to solve the problem. I am using a list from the database to populate the source as follows:</p>
  
  <pre><code>private DualListModel&lt;Course&gt; courseModel;
  public CourseBean() {
      List&lt;Course&gt; target = new ArrayList&lt;Course&gt;();
      List&lt;Course&gt; source = new ArrayList&lt;Course&gt;();
      courseModel = new DualListModel&lt;Course&gt;(source, target);
  }
  ...
  //this DualListModel getter also populates the source with values from db
  public DualListModel&lt;Course&gt; getCourseModel() {
      courseModel.setSource(getCourseList());
      return courseModel;
  }
  </code></pre>
  
  <p>My converter is</p>
  
  <pre><code>import org.omnifaces.converter.SelectItemsConverter;
  
  @FacesConverter("courseConverter")
  public class CourseConverter extends SelectItemsConverter {
  @Override
  public String getAsString(FacesContext context, UIComponent component,
          Object value) {
      Integer id = (value instanceof Course) ? ((Course) value).getId()
              : null;
      return (id != null) ? String.valueOf(id) : null;
  }
  @Override
  public Object getAsObject(FacesContext arg0, UIComponent arg1, String value) {
      Course course = new Course();
      course.setId(Integer.parseInt(value));
      return course;
  }
  }
  </code></pre>
  
  <p>and finally my xhtml page is:</p>
  
  <pre><code>&lt;h:form&gt;
      &lt;p:pickList id="coursesOffered"
          value="#{courseView.courseModel}" var="course"
          itemValue="#{course}" itemLabel="#{course.courseTitle}"
          converter="courseConverter" showSourceFilter="true"
          showTargetFilter="true" filterMatchMode="contains"&gt;
  
          &lt;f:facet name="targetCaption"&gt;Selected&lt;/f:facet&gt;
          &lt;f:facet name="sourceCaption"&gt;All Courses&lt;/f:facet&gt;
  
          &lt;p:ajax event="transfer" listener="#{courseView.onTransfer}" /&gt;
  
          &lt;p:column style="width:10%"&gt;  
          #{course.courseCode}:
      &lt;/p:column&gt;
          &lt;p:column style="width:90%"&gt;  
         #{course.courseTitle}  
      &lt;/p:column&gt;
  
      &lt;/p:pickList&gt;
  
      &lt;p:commandButton id="pojoSubmit" value="Submit"
          update="displayPlayers" oncomplete="playerDialog.show()"
          style="margin-top:5px" /&gt;
  
      &lt;p:dialog showEffect="fade" hideEffect="fade" widgetVar="playerDialog"&gt;
          &lt;h:panelGrid id="displayPlayers" columns="2"&gt;
  
              &lt;h:outputText value="Source: " style="font-weight:bold" /&gt;
              &lt;ui:repeat value="#{courseView.courseModel.source}"
                  var="course"&gt;
                  &lt;h:outputText value="#{course.courseTitle}"
                      style="margin-right:5px" /&gt;
              &lt;/ui:repeat&gt;
  
              &lt;h:outputText value="Target: " style="font-weight:bold" /&gt;
              &lt;ui:repeat value="#{courseView.courseModel.target}"
                  var="course"&gt;
                  &lt;h:outputText value="#{course.courseTitle}"
                      style="margin-right:5px" /&gt;
              &lt;/ui:repeat&gt;
  
          &lt;/h:panelGrid&gt;
      &lt;/p:dialog&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>The pickList is displayed correctly with source populated with values from database, however, upon clicking the button, the dialog just displays the original source list values and an empty target list even after transferring items on the interface.  What am I missing?</p>