title: Validator in composite throws ClassCastException when using java.lang.Double value
body: <p>I had a two field validator working without the composite as follows</p>
  
  <pre><code>public class DoubleMustBeGreaterThanSecondDouble implements Validator {
  
      @Override
      public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
          Double firstDouble = (Double) value;
          Double secondDouble = (Double) component.getAttributes().get("secondDouble");
  
          if (firstDouble &lt;= secondDouble) {
              FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, null, null);
              throw new ValidatorException(msg);
          }
      }
  }
  </code></pre>
  
  
  
  <pre><code>&lt;p:inputText size="5"
      validatorMessage="Plate maximum thickness must exceed plate minimum thickness"
      value="#{calculator.boltAnalysis.plate1.maximum_thickness}"&gt;
                  &lt;f:validator
                      validatorId="doubleMustBeGreaterThanSecondDouble" /&gt;
                  &lt;f:attribute name="secondDouble"
                      value="#{calculator.boltAnalysis.plate1.minimum_thickness}" /&gt;                                                                                                                                  
      &lt;p:ajax event="change" update="@this" /&gt;
  &lt;/p:inputText&gt;
  </code></pre>
  
  <p>But after converting to a composite I get <code>java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double:</code> on just the </p>
  
  <p><code>Double firstDouble = (Double) value;</code> and not on the </p>
  
  <p><code>Double secondDouble = (Double) component.getAttributes().get("secondDouble");</code></p>
  
  <p>here it is as the composite</p>
  
  <pre><code>&lt;p:inputText size="5"
      validatorMessage="Plate maximum thickness must exceed plate minimum thickness"
      value="#{cc.attrs.plateMaximumThickness}"&gt;
                  &lt;f:validator
                      validatorId="doubleMustBeGreaterThanSecondDouble" /&gt;
                  &lt;f:attribute name="secondDouble"
                      value="#{cc.attrs.plateMinimumThickness}" /&gt;                                                                                                                                  
      &lt;p:ajax event="change" update="@this" /&gt;
  &lt;/p:inputText&gt;
  </code></pre>
  
  
  
  <pre><code>&lt;stk:plate
          plateLabel="3" 
          plateMinimumThickness="#{calculator.boltAnalysis.plate3.minimum_thickness}"  
          plateMaximumThickness="#{calculator.boltAnalysis.plate3.maximum_thickness}" 
       /&gt;
  </code></pre>
  
  <p>It is weird that one value comes over as a String and the other as a Double.  Do I just change to <code>Double firstDouble = Double.parseDouble(value);</code> for my first double and not worry why the <code>component.getAttributes()</code> is still passed to the validator as a double (the actual type of the attribute in the Java Bean) even though the composite seems the same as far as those two fields go and just move on?</p>
  
  <h1>EDIT</h1>
  
  <p>Here is my composite interface.  Even after specifying the type, I still get class cast exception</p>
  
  <pre><code>&lt;composite:interface&gt;
     &lt;composite:attribute name="plateLabel" /&gt;
     &lt;composite:attribute name="plateMinimumThickness" type="java.lang.Double"  /&gt;
     &lt;composite:attribute name="plateMaximumThickness" type="java.lang.Double" /&gt;
  &lt;/composite:interface&gt;
  
  &lt;composite:implementation&gt;
     ...
  </code></pre>