title: primefaces selectOneMenu doesn't working when it should
body: <p>I'm losing days with this strange problem, I double checked everything but my selectOneMenu simply doesn't works and I can't understand why. </p>
  
  <p>So here are my codes:</p>
  
  <p>My jsf</p>
  
  <pre><code>&lt;p:selectOneMenu id="entityType"  
        value="#{entityBean.entity.type}" 
        style="width:240px;" 
        converter="entityTypeConverter"
        valueChangeListener="#{entityBean.entityTypeListener}"
        required="true"&gt;
        &lt;f:selectItems value="#{entityBean.typeList}"
                var="et"
                itemLabel="#{et.name}"
                itemValue="#{et}" /&gt;
  &lt;/p:selectOneMenu&gt;
  </code></pre>
  
  <p>My converter:</p>
  
  <pre><code>    @FacesConverter("entityTypeConverter")
      public class EntityTypeConverter implements Converter {
          public Object getAsObject(FacesContext context, UIComponent component, String value) {
              if (value == null || value.length() == 0) {
                  return null;
              }
              Long id = Long.parseLong(value);
  
              return EntityType.findEntityType(id);
          }
  
          public String getAsString(FacesContext context, UIComponent component, Object value) {
  
              return value instanceof EntityType ? ((EntityType) value).getId().toString() : "";
          }
      }
  </code></pre>
  
  <p>It works as expected when I'm creating (it passes the selected value), but when I try to edit the entity the selected type actually never gets selected. I tried with primefaces 3.1.1 and 3.2 but I can't get the selected value when in view/edit mode.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks in advance!</p>