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

[jsr344-experts] Re: PFD review and pending issues

From: Edward Burns <edward.burns_at_oracle.com>
Date: Thu, 14 Mar 2013 14:06:52 -0700

>>>>> On Wed, 13 Mar 2013 23:53:17 -0500, Leonardo Uribe <lu4242_at_gmail.com> said:

LU> I remember this description:

FC> In Mojarra you can't apply multiple TagDecorator implementations to one
FC> tag (which is stated in the javadoc of TagDecorator). Once a TagDecorator
FC> successfully decorated a tag, the process is ended. The only exception
FC> is the DefaultTagDecorator, which handles the new jsf: syntax. It runs
FC> first and then the users tag decorators will be applied.

LU> Note the default TagDecorator is special, and that should be
LU> mentioned.

The javadoc for TagDecorator says:

  The runtime must provide a default implementation of this interface that
  performs the following actions...

LU> Can the default TagDecorator be overriden?.

Yes, with ViewHandler.FACELETS_DECORATORS_PARAM_NAME context-param, as
mentioned here in the javadoc for TagDecorator:

  ...If none of the attributes are declared to be in the
  http://xmlns.jcp.org/jsf namespace, iterate through the list of
  TagDecorator instances created from the values in the
  ViewHandler.FACELETS_DECORATORS_PARAM_NAME context-param, if any. For
  each entry, call its decorate(javax.faces.view.facelets.Tag) method,
  passing the argument tag. The first such entry that returns non-null
  from its decorate(javax.faces.view.facelets.Tag) method must cause the
  iteration to stop.

Ed