[jsr-314-open] Composite component metadata runtime behavior

Kito Mann kito.mann at virtua.com
Thu Feb 3 11:49:26 EST 2011


On Wed, Feb 2, 2011 at 2:40 PM, Andy Schwartz <andy.schwartz at oracle.com>wrote:

> Gang -
>
> 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:
>
>  <cc:attribute name="foo" type="java.lang.Integer"/>
>
> To result in a warning/error when used as follows:
>
>  <comp:bar foo="MostDefinitelyNotAnInteger"/>
>
> This seems like a reasonable expectation.  An equivalent test case using,
> for example, JSP tag files does result in an error.
>
> This raises a few questions:
>
> 1.  Should JSF implementations be making use of composite component
> metadata (like "type") at runtime to enforce the intentions of the composite
> component author?
>
> Yes, assuming this can be done without sacrificing performance.


> 2.  Should this behavior be specified?
>

Yes.

>
> 3.  Are there other places where we have similar metadata (eg. Facelets
> taglib.xml files) that we should review as well?
>

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).

>
> Andy
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20110203/e511ece0/attachment-0002.html 


More information about the jsr-314-open-mirror mailing list