title: primeFaces 5.2 selectOneMenu valueChangeListener why event get itemLabel instead of itemValue?
body: <p>I got a very funny issues: When I tried to access selectOneMenu selected value by using valueChangeListener's valueChangeEvent. I got itemLabel instead of itemValue.</p>
  
  <p>jsf snappet:</p>
  
  <pre><code>&lt;p:selectOneMenu id="position" value="#{employmentBean.currentEmployment.positionId}" required="true" effect="fold" editable="true"
                   requiredMessage="Please select an available option." hideNoSelectionOption="true" immediate="true" valueChangeListener="#{employmentControlBean.handlepositionIdSelected}"&gt;
     &lt;p:ajax update="@form" /&gt;
     &lt;f:selectItem itemLabel="Select Position to Create Employment." itemValue="" /&gt;
     &lt;f:selectItems value="#{positionBean.vacantPositionMap.entrySet()}" var="entry" itemLabel="#{entry.value}" itemValue="#{entry.key}"/&gt;
  &lt;/p:selectOneMenu&gt;
  </code></pre>
  
  <p>my vacantPositionMap is a</p>
  
  <pre><code>Map&lt;String,String&gt; 
  </code></pre>
  
  <p>style key/value pair, key is position Id, value is position Name.</p>
  
  <p>my backing bean:</p>
  
  <pre><code>@Named(value = "employmentControlBean")
  @SessionScoped
  public class EmploymentControlBean(){
      public void handlepositionIdSelected(ValueChangeEvent event){
      ........
      String positionId = (String) event.getNewValue();
      positionBean.setCurrentPosition((Position) positionBean.getPositionCache().get(positionId));
      employmentBean.getCurrentEmployment().setPositionId(positionId);
    }
  }
  </code></pre>
  
  <p>from above snappet you can see. I am trying to fetch selectOneMenu selected value on valueChangeEvent.</p>
  
  <p>Backing bean method by using ValueChangeEvent, I suppose JSF's itemValue will be passed to backing bean by using ValueChangeEvent.</p>
  
  <p>This is what I found in my html by using firebug:</p>
  
  <p><a href="https://i.stack.imgur.com/JiPb1.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JiPb1.jpg" alt="enter image description here"></a></p>
  
  <p>From above image you can see, primeFaces rendering html correctly, but when I tried to access selected value I get "President". It is not I expected, I expect will get "POSTN20161215xxxxxx".</p>
  
  <p>My question is: Why ValueChangeEvent pass itemLabel instead of itemValue? How I can get the correct value?</p>
  
  <p>Please advise!!</p>