users@javaserverfaces-spec-public.java.net

[jsr344-experts mirror] [jsr344-experts] Re: [594-FacesComponentTagHandler] PROPOSAL PROVISIONALLY CLOSED

From: Kito Mann <kito.mann_at_virtua.com>
Date: Fri, 17 Feb 2012 09:13:16 -0500

On Thu, Feb 16, 2012 at 5:30 PM, Martin Marinschek
<mmarinschek_at_apache.org>wrote:

> Hi Ed,
>
> Why would this make a difference? You could sell to me that you cannot
> use @Named due to technological restrictions - but you cannot sell to
> me that you cannot use it because UIComponents are not Pojos.
>
> I rather think that UIComponents should be much more like Pojos in the end
> ;)
>
> In any case, in a CDI container, every class is a bean, as long as
> there is a META-INF/beans.xml in the same "package" (e.g. jar file).
> So also UIComponents will end up being beans if this file is there.
>

I feel like @Named has a different purpose, though -- exposing the
component to CDI. Wouldn't using it here be a little confusing?

How about using a different annotation instead, like @FacesTag? This avoids
the need to always set an attribute to true for the @FacesComponent
annotation, and it would be easy to support an a default attribute that can
provide an alternate name.


>
> best regards,
>
> Martin
>
> On 2/16/12, Edward Burns <edward.burns_at_oracle.com> wrote:
> >>>>>> On Tue, 14 Feb 2012 10:30:01 -0500, Kito Mann <kito.mann_at_virtua.com
> >
> >>>>>> said:
> >
> > KM> Hello Ed,
> > KM> I understand the decisions you made with respect to the tagName
> > attribute.
> > KM> I do have a couple of suggestions, though:
> >
> > KM> * Rename the tagHandler attribute to something like "createTag".
> >
> > Done.
> >
> >>>>>> On Wed, 15 Feb 2012 02:42:42 +0100, Martin Marinschek
> >>>>>> <mmarinschek_at_apache.org> said:
> >
> > MM> maybe I am way off base here, but wouldn't the @Named annotation from
> > MM> the Injection JSR fit the bill just fine instead of an attribute on
> > MM> the @FacesComponent?
> >
> > With @Named there is no requirement that the class to which the
> > annotation implements any specific contract. In other words, @Named is
> > just for POJOs. 594-FacesComponentTagHandler is specifically for
> > classes that are UIComponents.
> >
> > After I make this clarification, do you still persist in your suggestion
> > that we investigate using @Named in this context?
> >
> > Ed
> >
> > --
> > | edward.burns_at_oracle.com | office: +1 407 458 0017
> > | homepage: | http://ridingthecrest.com/
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>