title: JSF 2.0: h:inputText inside composite component fails with non-String objects when validation is set
body: <p>In a backing bean:</p>
  
  <pre><code>@Min(3)
  Integer foo;
  </code></pre>
  
  <p>If I have form like:</p>
  
  <pre><code>&lt;h:form&gt;
      &lt;h:commandButton value="Submit" /&gt;
      &lt;h:inputText value="#{bean.foo}" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>This works ok. However, if I do something like</p>
  
  <pre><code>&lt;cc:interface&gt;
      &lt;cc:attribute name="text" /&gt;
      &lt;cc:editableValueHolder name="text" targets="field" /&gt;
  &lt;cc:interface&gt;
  &lt;cc:implementation&gt;
      &lt;h:inputText id="field" value="#{cc.attrs.text}" /&gt;
  &lt;/cc:implementation&gt;
  </code></pre>
  
  <p>and call this inside form instead of directly <code>h:inputText</code> as in:</p>
  
  <pre><code>&lt;!-- &lt;h:inputText value="#{bean.foo}" /&gt; --&gt;
  &lt;pref:fieldComponent text="#{bean.foo}" /&gt;
  </code></pre>
  
  <p>But then I get:</p>
  
  <pre><code>javax.validation.ValidationException: Unexpected exception during isValid call
      at org.hibernate.validator.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:144)
      at org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:118)
      at org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:121)
      at org.hibernate.validator.engine.ValidatorImpl.validateValueForGroup(ValidatorImpl.java:655)
      ...
  </code></pre>
  
  <p>And the root cause is:</p>
  
  <pre><code>Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
      at org.hibernate.validator.constraints.impl.MinValidatorForNumber.isValid(MinValidatorForNumber.java:32)
      at org.hibernate.validator.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:141)
      ... 69 more
  </code></pre>
  
  <p>If I remove validation, it works. Also, if <code>foo</code> is of type <code>String</code>, it works also with validations.</p>
  
  <p>I tried playing with <code>cc:editableValueHolder</code>, defining different types (also omitting it) and a few other tricks but I am a bit unsure how to actually implement this. Or is it a bug? Seems like it's forgetting to use a converter? Have I misunderstood something?</p>