title: issue with ajax in primefaces "selectOneMenu"
body: <p>index.xhtml</p>
  
  <pre><code>        &lt;p:selectOneMenu id="d2" value="#{mainManageBean.areaSelected}"  &gt;
              &lt;f:selectItem itemValue="" itemLabel="Select one" /&gt;
              &lt;f:selectItems value="#{mainManageBean.areaList}" var="area"
                             itemValue="#{area.id}" itemLabel="#{area.name}"/&gt; 
          &lt;p:ajax event="valueChange" listener="#{mainManageBean.changeAreaSelect()}" update="hi"  /&gt; 
          &lt;/p:selectOneMenu&gt;
  </code></pre>
  
  <p>When i have value set like this "mainManageBean.areaSelected" where areaSelected is entity from database</p>
  
  <pre><code>private Area areaSelected; 
  </code></pre>
  
  <p>the ajax event dont work,
  but when i change it to something like this "mainManageBean.s1menu" where this "s1menu" is just a normal String ajax event work fine.</p>
  
  <p>What is the reason of that and how to fix it?</p>
  
  <h1>Edit</h1>
  
  <p>this is my buged converter:</p>
  
  <pre><code>@FacesConverter
  public class areaConverter implements Converter{
  
  
  @Override
  public Object getAsObject(FacesContext context, UIComponent component, String value) {
  
      // here i have problem value is id of entity and have no idea how to get this entity form this id
  
      throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
  }
  
  // works fine value = Area entity
  @Override
  public String getAsString(FacesContext context, UIComponent component, Object value) {
     if (value == null || value.equals("")) {  
          return "";  
      } else {  
          return String.valueOf(((Area) value).getId());  
      } 
  }    
  }
  </code></pre>
  
  <p>Have problem with getAsObject, i have this value as id but cant get entity from it. Normaly i would use AreaFacade.find(id) but i cant use there @EJB to get it.</p>