title: Getting data from p:autocomplete with a converter
body: <p>I'm using PrimeFaces 5.0.</p>
  
  <p>What I'm trying to do is with the help of the 1p:autocomplete1 look on the BD, returning suggestions and using itemtip show some other information need it, everything seem to work well, the problem is that when I get the data and selected, this data is not setting it on the property... </p>
  
  <p>autocomplete with the itemtip:</p>
  
  <pre><code>&lt;p:row&gt;
      &lt;p:column colspan="10"&gt;
          &lt;p:outputLabel value="Orden de Compra "/&gt;
          &lt;p:autoComplete id="itemTip" value="#{c_ordenCompra.encabezado_encontrado}" 
                          completeMethod="#{c_ordenCompra.completarOrdenCpra}"
                          var="orden" itemLabel="#{orden.numdocucv}" itemValue="#{orden.idencacv}" 
                          converter="themeConverter" forceSelection="true"&gt;
              &lt;f:facet name="itemtip"&gt;
                  &lt;h:panelGrid columns="2" cellpadding="3" cellspacing="5"&gt;
                      &lt;h:outputText value="Fecha" /&gt;
                      &lt;h:outputText value="#{orden.fechadoctocv}" /&gt;
  
                      &lt;h:outputText value="Sucursal" /&gt;
                      &lt;h:outputText value="#{orden.tbsucursalesByFkencacvsucurentra.nomsucur}" /&gt;
  
                      &lt;h:outputText value="Proveedor" /&gt;
                      &lt;h:outputText value="#{orden.tbpersonasrelaByIdpersorelaprove.nomcompleto}" /&gt;
                  &lt;/h:panelGrid&gt;
              &lt;/f:facet&gt;
  
          &lt;/p:autoComplete&gt;
          &lt;p:commandButton value="buscar" actionListener="#{c_ordenCompra.seleccionarorden()}"/&gt;
      &lt;/p:column&gt;
  &lt;/p:row&gt;
  </code></pre>
  
  <p>Here is the converter I'm trying to use. (I made some test here and everything seems to work.) </p>
  
  <pre><code>public class converterOC implements Converter {
  public Object getAsObject(FacesContext fc, UIComponent uic, String value) {
      if (value != null &amp;&amp; value.trim().length() &gt; 0) {
          try {
              M_encacv modelo_encacv = new M_encacv();
              Tbencacv encav_encontrado = modelo_encacv.Ordene1CompraEncacv(value);
              return encav_encontrado;
          } catch (NumberFormatException e) {
              throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Not a valid theme."));
          }
      } else {
          return null;
      }
  }
  
  public String getAsString(FacesContext fc, UIComponent uic, Object object) {
      if (object != null) {
          return String.valueOf(object);
      } else {
          return null;
      }
  }
  </code></pre>
  
  <p>Entity:</p>
  
  <pre><code>public class Tbencacv implements java.io.Serializable {
  
  private int idencacv;
  private Tbbancos tbbancos;
  private Tbbodegas tbbodegasByFkencacvbodesalida;
  private Tbbodegas tbbodegasByFkencacvbodeentra;
  private Tbcajasvta tbcajasvta;
  private Tbcajerosvta tbcajerosvta;
  private Tbcias tbcias;
  private Tbencainven tbencainven;
  private Tbpersonasrela tbpersonasrelaByIdpersorelaprove;
  private Tbpersonasrela tbpersonasrelaByIdpersorelaemple;
  private Tbpersonasrela tbpersonasrelaByIdpersorelacliente;
  private Tbsucursales tbsucursalesByFkencacvsucurentra;
  private Tbsucursales tbsucursalesByFkencacvsucursalida;
  private Tbterminoscv tbterminoscv;
  private Tbtiposmovicv tbtiposmovicv;
  private Tbvendecobra tbvendecobra;
  private Date fechadoctocv;
  private String observagralcv;
  private String concepcontagralcv;
  private Double valortotalcv;
  private Double valorivacv;
  private Double valorimpuperecv;
  private Double valorexencv;
  private Double valorgravacv;
  private Double valornosujecv;
  private Double valorfovialcv;
  private Double porcedescuv;
  private String procedecv;
  private char cpravta;
  private Double valorrentacv;
  private int numdocucv;
  private char autorizadocucv;
  private Date fechablc;
  private Character aplicalibroiva;
  private Double valorefectivo;
  private Double valortarjeta;
  private Double valorcheque;
  private Integer numcheque;
  private String numreserva;
  private String numbaucher;
  private String numaprobacion;
  private Character importacion;
  private Character sujetoexcluido;
  private Character retentercero;
  private String direccionenviar;
  private String nomclientedocu;
  private Double valorcredito;
  private Integer codprove;
  private String nomvencob;
  private Integer codcliente;
  private Integer codemple;
  private Character movcerrado;
  private Character afectaexisten;
  private Character docucvimpre;
  private Character paraconsu;
  private Character parainven;
  private Character paracl;
  private String nomuser;
  private Set&lt;Tbdetacv&gt; tbdetacvs = new HashSet&lt;Tbdetacv&gt;(0);
  
  public Tbencacv() {
  }
  //all setters and getters
  </code></pre>
  
  <p>In the same row as the autocomplete I have a commandbutton. It is suppose to print on console one data from the property I had set on the autocomplete, but it shows nothing.</p>
  
  <pre><code> public void seleccionarorden() {
      System.out.println(getEncabezado_encontrado().getValorivacv());
      System.out.println(Encabezado_encontrado.getValorivacv());
  }
  </code></pre>
  
  <p>I tried everything it comes to my mind, but I ran out of ideas</p>
  
  <p><a href="http://i.stack.imgur.com/hx3kn.jpg" rel="nofollow">what it show on the page</a></p>
  
  <p>This is what the console show. Not even an exception:</p>
  
  <p><a href="http://i.stack.imgur.com/A6PM1.jpg" rel="nofollow">what the console show</a></p>