Class InsertProcessor
- java.lang.Object
-
- org.thymeleaf.processor.AbstractProcessor
-
- org.thymeleaf.processor.element.AbstractElementModelProcessor
-
- org.thymeleaf.processor.element.AbstractAttributeModelProcessor
-
- nz.net.ultraq.thymeleaf.layoutdialect.includes.InsertProcessor
-
- All Implemented Interfaces:
IElementModelProcessor
,IElementProcessor
,IProcessor
public class InsertProcessor extends AbstractAttributeModelProcessor
Similar to Thymeleaf'sth:insert
, but allows the passing of entire element fragments to the included template. Useful if you have some HTML that you want to reuse, but whose contents are too complex to determine or construct with context variables alone.- 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 InsertProcessor(TemplateMode templateMode, String dialectPrefix)
Constructor, sets this processor to work on the 'insert' attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doProcess(ITemplateContext context, IModel model, AttributeName attributeName, String attributeValue, IElementModelStructureHandler structureHandler)
Locates a page fragment and inserts it in the current template.-
Methods inherited from class org.thymeleaf.processor.element.AbstractAttributeModelProcessor
doProcess
-
Methods inherited from class org.thymeleaf.processor.element.AbstractElementModelProcessor
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
-
InsertProcessor
public InsertProcessor(TemplateMode templateMode, String dialectPrefix)
Constructor, sets this processor to work on the 'insert' attribute.- Parameters:
templateMode
-dialectPrefix
-
-
-
Method Detail
-
doProcess
protected void doProcess(ITemplateContext context, IModel model, AttributeName attributeName, String attributeValue, IElementModelStructureHandler structureHandler)
Locates a page fragment and inserts it in the current template.- Specified by:
doProcess
in classAbstractAttributeModelProcessor
- Parameters:
context
-model
-attributeName
-attributeValue
-structureHandler
-
-
-