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

[jsr372-experts] Re: [1196-faceletTagConveniences] Call for proposal (was: Re: Expert Group Meeting @ JavaOne)

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Thu, 23 Oct 2014 16:48:45 +0200

Hi,

On Wed, Oct 22, 2014 at 10:17 PM, Edward Burns <edward.burns_at_oracle.com> wrote:
>>>>>> On Mon, 13 Oct 2014 20:08:41 +0200, arjan tijms <arjan.tijms_at_gmail.com> said:
> JJ> From a community standpoint, I definitely agree that reduction of
> JJ> taglib.xml boilerplate would make taglibs seem less onerous.
>
> AT> Absolutely. The issue that btw most closely corresponds to this is this
> AT> one: https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1196
>
> As I said in the issue, this looks useful. Arjan, can you please start
> the discussion here by sketching out what you propose.

Sure!

The idea is that Facelets tags originate from an era where it was
common practice to register artefacts in external files. E.g. JSF
Managed Beans were registered in faces-config.xml, Servlets were
registered in web.xml, etc.

Lately we have been moving more towards the idea of thinking from the
point of view of the artefact. There's less emphasis on external
bookkeeping, and either the location of the artefact or some meta-data
on it is enough to enable the runtime to use it. The example given in
the issue is that of a composite component being put in the /resources
folder. Another example is that of a Java class being annotated by
@Named.

Facelets tags however still have to be registered in a taglib.xml
file, which detracts from their attractiveness.

The proposal is thus to have a similar auto-registering feature that
composite components have, e.g. by putting them too in the /resource
folder, but with a different root tag than composites (perhaps just
ui:composition). Likewise, to have those auto registered tag files be
truly self contained artefacts some kind of syntax has to be invented
to declare which parameters (if any) the tag file accepts. This can be
something like composite components use, or maybe just ui:attribute
(which is more limited of course).

Kind regards,
Arjan Tijms