title: <p:selectOneMenu> <f:selectItems> shows toString() in the itemLabel
body: <p>When I use f:selectItems the itemLabel doesnt show the property descricao, but show the toString(). I've made some researches, but the problem continues. <a href="https://stackoverflow.com/questions/25864944/fselectitems-only-shows-tostring-of-the-model-as-item-label?answertab=oldest#tab-top">&lt;f:selectItems&gt; only shows toString() of the model as item label</a></p>
  
  <p>What am I doing wrong? Any ideas?</p>
  
  <p>I have a class Tipo as follow:</p>
  
  <pre><code>   public class Tipo implements Serializable{
  
      /**
       * 
       */
      private static final long serialVersionUID = -763536865855419703L;
      // descrição do tipo
      private String descricao;
      // código do tipo
      private Long tipoId;
  
  
      public Object clone() {
          try {
              return super.clone();
          } catch (CloneNotSupportedException cnse) {
              return null;
          }
      }
  
      public Tipo(Long id) {
          this.tipoId = id;
      }
  
      public Tipo() {
  
      }
  
      public String getDescricao() {
          return descricao;
      }
  
      public Long getTipoId() {
          return tipoId;
      }
  
      public void setDescricao(String umaDesc) {
          this.descricao = umaDesc;
      }
  
      public void setTipoId(Long id) {
          this.tipoId = id;
      }
  
  
  
  
      public String toString() {
          return " ID=" + this.getTipoId() + ", Descricao=" + this.getDescricao();
      }
  
      @Override
      public boolean equals(Object other){
          return (other != null &amp;&amp; getClass() == other.getClass() &amp;&amp; tipoId != null) 
                  ? tipoId.equals(((Tipo) other).tipoId) : (other == this);
      }
  
      @Override
      public int hashCode() {
          return (tipoId != null) 
                  ? (getClass().hashCode() + tipoId.hashCode()) : super.hashCode();
      }
  
  
  }
  </code></pre>
  
  <p>And a TipoDAOImpl:</p>
  
  <pre><code>    public class TipoDAOImpl extends NamedParameterJdbcDaoSupport implements TipoDAO, Serializable {
  
      private static final long serialVersionUID = 8698127647660788120L;
      private SimpleJdbcInsert sji;
      @Value("#{queries.sql03}")
      private String sql03;
      @Value("#{queries.sql04}")
      private String sql04;
  
  @Override
      public List&lt;Tipo&gt; getTodosTipos() throws DAOException {
          try {
              RowMapper&lt;Tipo&gt; mapper = getRowMapper();
              return getJdbcTemplate().query(this.sql03, mapper);
          } catch (EmptyResultDataAccessException ex) {
              throw new DAOException("Não há registros na tabela de tipos.");
          } catch (DataAccessException e) {
              throw new DAOException(e.getMessage());
          }
  
      }
  
  
  
      private RowMapper&lt;Tipo&gt; getRowMapper() {
          RowMapper&lt;Tipo&gt; mapper = new RowMapper&lt;Tipo&gt;() {
              public Tipo mapRow(ResultSet rs, int rowNum) throws SQLException {
                  Tipo t = new Tipo();
                  t.setTipoId(rs.getLong("tipo_id"));
                  t.setDescricao(rs.getString("descricao"));
  
                  return t;
              }
          };
          return mapper;
  
      }
  
      protected SimpleJdbcInsert getSji() {
          return sji;
      }
  
      protected void setSji(SimpleJdbcInsert sji) {
          this.sji = sji;
      }
  
  
  }
  </code></pre>
  
  <p>ManagedBean:</p>
  
  <pre><code> @ManagedBean
  @SessionScoped
  public class TipoMB extends ManagedBeanBasico implements Serializable{
  
  
      private static final long serialVersionUID = 2482494734070978599L;
      @ManagedProperty(name = "tipoFacade", value = "#{tipoFacade}")
      private TipoFacade tipoFacade;
      private List&lt;Tipo&gt; listTipos;
      private Tipo tipo;
  
           public List&lt;Tipo&gt; getTodosTipos(){
                      try {
                          listTipos = tipoFacade.getTodosTipos();
                      } catch (DAOException e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                      }
                      return listTipos;
                  }
  </code></pre>
  
  <p>Converter:</p>
  
  <pre><code>    @FacesConverter(value="tipoConverter")
  public class TipoConverter implements Converter {
  
      @EJB private Tipo tipo;
      @EJB private TipoFacade tipoFacade;
  
      @Override
      public Object getAsObject(FacesContext context, UIComponent component, String value)
              throws ConverterException {
          try {
              return tipoFacade.getTipoPorId(Long.parseLong(value));
          } catch (NumberFormatException e) {
              e.printStackTrace();
          } catch (DAOException e) {
              e.printStackTrace();
          }
          return value;
  
      }
  
      @Override
      public String getAsString(FacesContext context, UIComponent component,
              Object value) throws ConverterException {
          if (value == null) {
              return "";
          } 
          if (!(value instanceof Tipo)) {
              throw new ConverterException("Não é um tipo válido " + value );
          }
          return ((Tipo) value).getTipoId().toString();
  
      }
  </code></pre>
  
  <p>form.xhtml:</p>
  
  <pre><code>&lt;h:outputText value="TIPO:"/&gt;
              &lt;p:selectOneMenu value="#{publicacaoMB.publicacao.tipo}" converter="tipoConverter"&gt;
                  &lt;f:selectItems value="#{tipoMB.listTipos}" var="tipo"
                              itemLabel="#{tipo.descricao}" itemValue="#{tipo.tipoId}"/&gt;
              &lt;/p:selectOneMenu&gt;
  </code></pre>