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

[jsr344-experts] Re: FacesComponent API review

From: Andy Schwartz <andy.schwartz_at_oracle.com>
Date: Mon, 18 Mar 2013 15:34:34 -0400

On 3/18/13 11:12 AM, Edward Burns wrote:
>>>>>> On Mon, 18 Mar 2013 10:18:12 -0400, Kito Mann <kito.mann_at_virtua.com> said:
>>>>>>
>
> AS> Additionally having to specify createTag=true seems unnecessary.
>
> EB> I wanted to make the feature very much explicitly "opt-in".
>
> KM> Why? When would you *not* want a tag?
>
> One may already have a tag that they want to use and still use the
> @FacesComponent annotation to declare the component to the runtime.

Right. In that case they wouldn't specify either tagName or namespace
values.

So the question is why do these:

> @FacesComponent(tagName="fooLayout")
> public class Foo extends UIComponentBase
>
> @FacesComponent(namespace="http://my.namespace.org")
> public class Foo extends UIComponentBase
>
> @FacesComponent(namespace="http://my.namespace.org", tagName="fooLayout")
> public class Foo extends UIComponentBase

Behave as if createTag="false"? By specifying tagName or namespace, the
app developer is signaling their desire to expose a tag, but JSF is
ignoring this.

It's not a big deal - not like this comes up a lot. But it does seem
like a simpler API is within reach if we want it.

Andy