Class LegacyDecorateHandler
java.lang.Object
jakarta.faces.view.facelets.TagHandler
org.apache.myfaces.view.facelets.tag.ui.LegacyDecorateHandler
- All Implemented Interfaces:
FaceletHandler
,TemplateClient
The decorate tag acts the same as a composition tag, but it will not trim
everything outside of it. This is useful in cases where you have a list of
items in a document, which you would like to be decorated or framed.
The sum of it all is that you can take any element in the document and decorate
it with some external logic as provided by the template.
NOTE: This implementation is provided for compatibility reasons and
it is considered faulty. It is enabled using
org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY web config param.
Don't use it if EL expression caching is enabled.
- Version:
- $Id: DecorateHandler.java,v 1.16 2008/07/13 19:01:41 rlubke Exp $
- Author:
- Jacob Hookom
-
Field Summary
Fields inherited from class jakarta.faces.view.facelets.TagHandler
nextHandler, tag, tagId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(FaceletContext ctx, UIComponent parent) boolean
apply
(FaceletContext ctx, UIComponent parent, String name) This contract is much like the normal FaceletHandler.apply method, but it takes in an optional String name which tells this instance what fragment/definition it's looking for.Methods inherited from class jakarta.faces.view.facelets.TagHandler
getAttribute, getRequiredAttribute, toString
-
Constructor Details
-
LegacyDecorateHandler
-
-
Method Details
-
apply
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, jakarta.el.ELException - Specified by:
apply
in interfaceFaceletHandler
- Throws:
IOException
FacesException
FaceletException
jakarta.el.ELException
-
apply
public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException, FacesException, FaceletException, jakarta.el.ELException Description copied from interface:TemplateClient
This contract is much like the normal FaceletHandler.apply method, but it takes in an optional String name which tells this instance what fragment/definition it's looking for. If you are a match, apply your logic to the passed UIComponent and return true, otherwise do nothing and return false.- Specified by:
apply
in interfaceTemplateClient
- Parameters:
ctx
- the FaceletContext of your instance, not the templates'parent
- current UIComponent instance to be appliedname
- the String name or null if the whole body should be included- Returns:
- true if this client matched/applied the definition for the passed name
- Throws:
IOException
FacesException
FaceletException
jakarta.el.ELException
-