public interface IElementModelStructureHandler
Structure handler class meant to be used by IElementModelProcessor
implementations.
Structure handlers allow processors to instruct the engine to perform a series of actions that cannot be done directly from the processors themselves, usually because these actions are applied or have effects on scopes broader than the processed events themselves.
Modifier and Type | Method and Description |
---|---|
void |
removeLocalVariable(String name)
Instructs the engine to remove a local variable.
|
void |
reset()
Resets all actions specified so far for the current processor execution.
|
void |
setInliner(IInliner inliner)
Instructs the engine to set a new inliner.
|
void |
setLocalVariable(String name,
Object value)
Instructs the engine to set a new local variable.
|
void |
setSelectionTarget(Object selectionTarget)
Instructs the engine to set a new selection target.
|
void |
setTemplateData(TemplateData templateData)
Instructs the engine to set a new template data.
|
void reset()
Resets all actions specified so far for the current processor execution.
void setLocalVariable(String name, Object value)
Instructs the engine to set a new local variable.
name
- the name of the variable.value
- the value of the variable.void removeLocalVariable(String name)
Instructs the engine to remove a local variable.
name
- the name of the variable.void setSelectionTarget(Object selectionTarget)
Instructs the engine to set a new selection target.
The selection target is the object on which selection expressions (*{...}) are executed. In the Standard Dialect, this selection target is usually modified by means of the th:object attribute, but custom processors can do it too. Note the selection target has the same scope as a local variable, and will therefore be accessible only inside the body of the element being processed.
selectionTarget
- the selection target to be set.void setInliner(IInliner inliner)
Instructs the engine to set a new inliner.
Inliners are used for processing all text nodes (IText
events) appearing
in the body of the element being processed. This is the mechanism used by the th:inline attribute to
enable inlining in any of the specified modes (text, javascript, etc).
inliner
- the inliner.void setTemplateData(TemplateData templateData)
Instructs the engine to set a new template data.
This method modifies the metadata about the template that is actually being processed. When inserting fragments, this allows the engine to know data about the specific fragment being processed, and also the complete stack of fragments being nested.
templateData
- the template data.Copyright © 2016 The THYMELEAF team. All rights reserved.