title: <p:selectOneMenu listener method returns null when a value is selected
body: <p>I am using JSF 2.0 with Primefaces 3.4.2</p>
  
  <p>I have the following in JSF page </p>
  
  <pre><code>&lt;p:selectOneMenu value="#{mb.employee}"&gt;
      &lt;f:selectItems value="#{mb.employeeList}" var="emp"
      itemLabel="#{emp.employeeName}" itemValue="#{emp.employeeCode}"/&gt;
      &lt;p:ajax listener="#{mb.changeMethod}" /&gt;
  &lt;/p:selectOneMenu&gt;
  </code></pre>
  
  <p>Problem is when I select a value in selectOneMenu, I am getting null in changeMethod of ManagedBean, for this <code>System.out.println("val  "+employee.getEmployeeName());</code></p>
  
  <p>What could be the reason for this? How can I resolve this problem?
  Any hep is highly appreciable.</p>
  
  <p><strong>ManagedBean</strong> Code</p>
  
  <pre><code>@Named("mb")
  @ViewAccessScoped
  public class MyBean implements Serializable {
  
  private Employee employee;
  private List&lt;Employee&gt; employeeList;
  
  @Inject
  EmployeeService employeeService;
  
  @PostConstruct
  public void loadEmployees() {
  employeeList = employeeService.getEmployees();
  }
  
  
  public void changeMethod() {
  System.out.println("val  "+employee.getEmployeeName());
  }
  
  
  /* getters and setters for employee and employeeList */
  .... methods
  /* */
  </code></pre>