title: FacesConverter forClass doesn't work with Composite Component
body: <p>I've got a simple composite component which has to render a inputText. When a put the value and press commandButton the follow exception is throw:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Cannot convert 1 of type class java.lang.String to class sample.entity.Product
  </code></pre>
  
  <p>When i use h:inputText instead d:myInputText it's work fine.</p>
  
  <p>Is possible use a FacesConverter and attribute forClass for composite component? I do not like to use converter attribute or converterId of tag f:converter.
  Anybody help me?</p>
  
  <p><b>Page code:</b></p>
  
  <pre><code>&lt;h:form&gt;
    &lt;h:messages /&gt;
    Product Id: &lt;h:myInputText value="#{productController.product}"/&gt;
    &lt;h:commandButton value="Submit" action="#{productController.someAction()}" /&gt;
    Product Description: &lt;h:outputText value="#{productController.product.description}"/&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p><b>Composite code:</b></p>
  
  <pre><code>&lt;composite:interface&gt;
     &lt;composite:attribute name="value"/&gt;
     &lt;composite:editableValueHolder name="value" targets="#{cc.clientId}:value"/&gt;
  &lt;/composite:interface&gt;
  
  &lt;composite:implementation&gt;
     &lt;div id="#{cc.clientId}"&gt;
        &lt;h:inputText id="value" value="#{cc.attrs.value}"/&gt;
        &lt;h:message for="#{cc.clientId}:value" /&gt;
      &lt;/div&gt;
  &lt;/composite:implementation&gt;
  </code></pre>
  
  <p><b>ManagedBean code:</b></p>
  
  <pre><code>@Named("productController")
  @RequestScoped
  public class ProductController {
  
    private Product product;
  
    public Product getProduct() {
      if (product == null) {
          product = new Product();
      }
      return product;
    }
  
    public void setProduct(Product product) {
      this.product = product;
    }
  
    public void someAction() {
      System.out.println("Product " + product);
    }
  }
  </code></pre>
  
  <p><b>Converter code:</b></p>
  
  <pre><code>@FacesConverter(forClass = Product.class)
  public class ProductConverter implements Converter {
  
    @Override
    public Object getAsObject(FacesContext fc, UIComponent uic, String value) {
      System.out.println("[DEBUG] getAsObject: " + value);
      if (value == null || "".equals(value)) {
          return null;
      }
      //TODO: some logic to get entity from database.
      return new Product(new Long(value));
    }
  
    @Override
    public String getAsString(FacesContext fc, UIComponent uic, Object o) {
      System.out.println("[DEBUG] getAsString: " + o);
      if (o == null) {
          return null;
      }
      return String.valueOf(((Product) o).getId());
    }
  }
  </code></pre>
  
  <p><b>Entity code:</b></p>
  
  <pre><code> public class Product {
  
        private Long id;
        private String description;
  
        public Product() {
        }
  
    public Product(Long id) {
      this.id = id;
    }
  
    public Long getId() {
      return id;
    }
  
    public void setId(Long id) {
      this.id = id;
    }
  
    public String getDescription() {
      return description;
    }
  
    public void setDescription(String description) {
      this.description = description;
    }
  
    @Override
    public int hashCode() {
      int hash = 7;
      hash = 29 * hash + (this.id != null ? this.id.hashCode() : 0);
      return hash;
    }
  
    @Override
    public boolean equals(Object obj) {
      if (obj == null) {
          return false;
      }
      if (getClass() != obj.getClass()) {
          return false;
      }
      final Product other = (Product) obj;
      if (this.id != other.id &amp;&amp; (this.id == null || !this.id.equals(other.id))) {
          return false;
      }
      return true;
    }
  
    @Override
    public String toString() {
      return "Product{" + "id=" + id + '}';
    }
  }
  </code></pre>
  
  <p>I use Mojarra 2.1.14, Glassfish 3.1 and CDI.
  Best regards.</p>