<br><div class="gmail_quote">On Wed, Feb 2, 2011 at 2:40 PM, Andy Schwartz <span dir="ltr"><<a href="mailto:andy.schwartz@oracle.com">andy.schwartz@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Gang -<br>
<br>
I recently triaged a bug that complained that the "type" attribute of <cc:attribute> was not behaving correctly. The user expected the following attribute specification:<br>
<br>
<cc:attribute name="foo" type="java.lang.Integer"/><br>
<br>
To result in a warning/error when used as follows:<br>
<br>
<comp:bar foo="MostDefinitelyNotAnInteger"/><br>
<br>
This seems like a reasonable expectation. An equivalent test case using, for example, JSP tag files does result in an error.<br>
<br>
This raises a few questions:<br>
<br>
1. Should JSF implementations be making use of composite component metadata (like "type") at runtime to enforce the intentions of the composite component author?<br>
<br></blockquote><div>Yes, assuming this can be done without sacrificing performance.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2. Should this behavior be specified?<br></blockquote><div><br></div><div>Yes.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
3. Are there other places where we have similar metadata (eg. Facelets taglib.xml files) that we should review as well?<br></blockquote><div><br></div><div>Yes. I think in any case where we have type information about parameters (or even the # of parameters), we should enforce it. This is one of the issues people run into a lot when using Facelet compositions (not composite components).</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888">
<br>
Andy<br>
<br>
<br>
</font></blockquote></div><br>