jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] FacesComponent annotation does not allow to define rendererType

From: Leonardo Uribe <lu4242_at_gmail.com>
Date: Mon, 10 Jun 2013 21:45:53 +0100

Hi

Checking JSF 2.2 spec, I notice that @FacesComponent annotation like
for example in
this case:

@FacesComponent(value="oam.my.UIPanel2", createTag=true, tagName="myUIPanel2",
        namespace="http://my.coolorganization.org/tags")

does not have a way to set the default renderer type. It is important
to give the right
value to facelets, otherwise @ListenerFor or @ResourceDependency annotations
will not be scanned when the component is created, because the wrong variant of
Application.createComponent() could be called.

The easiest solution is just create one dummy component and call
getRendererType()
when the compiler is being setup. I think it is a legitimate solution,
but it is still not clear if
there is a 1-1 mapping between a facelet component tag and a
component/renderer.

This is not a bug per se, but maybe it is something that needs to be
clarified in the future.

regards,

Leonardo Uribe