Class FragmentProcessor
- java.lang.Object
-
- org.thymeleaf.processor.AbstractProcessor
-
- org.thymeleaf.processor.element.AbstractElementTagProcessor
-
- org.thymeleaf.processor.element.AbstractAttributeTagProcessor
-
- nz.net.ultraq.thymeleaf.layoutdialect.fragments.FragmentProcessor
-
- All Implemented Interfaces:
IElementProcessor
,IElementTagProcessor
,IProcessor
public class FragmentProcessor extends AbstractAttributeTagProcessor
This processor serves a dual purpose: to mark sections of the template that can be replaced, and to do the replacing when they're encountered.- Author:
- zhanhb, Emanuel Rabina
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROCESSOR_NAME
static int
PROCESSOR_PRECEDENCE
-
Constructor Summary
Constructors Constructor Description FragmentProcessor(TemplateMode templateMode, String dialectPrefix)
Constructor, sets this processor to work on the 'fragment' attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doProcess(ITemplateContext context, IProcessableElementTag tag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler structureHandler)
Inserts the content of fragments into the encountered fragment placeholder.-
Methods inherited from class org.thymeleaf.processor.element.AbstractAttributeTagProcessor
doProcess
-
Methods inherited from class org.thymeleaf.processor.element.AbstractElementTagProcessor
getDialectPrefix, getMatchingAttributeName, getMatchingElementName, process
-
Methods inherited from class org.thymeleaf.processor.AbstractProcessor
getPrecedence, getTemplateMode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.thymeleaf.processor.IProcessor
getPrecedence, getTemplateMode
-
-
-
-
Field Detail
-
PROCESSOR_NAME
public static final String PROCESSOR_NAME
- See Also:
- Constant Field Values
-
PROCESSOR_PRECEDENCE
public static final int PROCESSOR_PRECEDENCE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FragmentProcessor
public FragmentProcessor(TemplateMode templateMode, String dialectPrefix)
Constructor, sets this processor to work on the 'fragment' attribute.- Parameters:
templateMode
-dialectPrefix
-
-
-
Method Detail
-
doProcess
protected void doProcess(ITemplateContext context, IProcessableElementTag tag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler structureHandler)
Inserts the content of fragments into the encountered fragment placeholder.- Specified by:
doProcess
in classAbstractAttributeTagProcessor
- Parameters:
context
-tag
-attributeName
-attributeValue
-structureHandler
-
-
-