Interface BroadleafModelModifierProcessor
- All Superinterfaces:
BroadleafProcessor
- All Known Implementing Classes:
AbstractBroadleafModelModifierProcessor
A tag processor that changes the tag to the tagName specified in the BroadleafTemplateModelModifierDTO, adds attributes to that tag, adds local variables to that tag, and adds a
BroadleafTemplateModel as the last child of the tag.
This processor is similar to the BroadleafTagReplacementProcessor in that it modifies the DOM model. This processor is different in that
it is designed to keep the majority of the originally-written model intact and instead augment it with additional elements, tags, etc.
- Author:
- Jay Aisenbrey (cja769)
- See Also:
-
Field Summary
Fields inherited from interface org.broadleafcommerce.presentation.dialect.BroadleafProcessor
DEFAULT_PRECEDENCE, DEFAULT_PREFIX -
Method Summary
Modifier and TypeMethodDescriptiongetInjectedModelAndTagAttributes(String rootTagName, Map<String, String> rootTagAttributes, BroadleafTemplateContext context) booleanbooleanMethods inherited from interface org.broadleafcommerce.presentation.dialect.BroadleafProcessor
getName, getPrecedence, getPrefix
-
Method Details
-
useSingleQuotes
boolean useSingleQuotes()- Returns:
- true if the attribute values on the tag should be surrounded by single quotes or false if they should be surrounded by double quotes
-
reprocessModel
boolean reprocessModel()- Returns:
- true if the model inserted as the last child should be reprocessed because it contains template logic or false if it shoudn't
-
getInjectedModelAndTagAttributes
BroadleafTemplateModelModifierDTO getInjectedModelAndTagAttributes(String rootTagName, Map<String, String> rootTagAttributes, BroadleafTemplateContext context) - Parameters:
rootTagName- The name of the tag the event was triggered onrootTagAttributes- A map of String to String of all of the attributes on the tagcontext- TheBroadleafTemplateContextthat should be used to perform operations on the tag with- Returns:
- A
BroadleafTemplateModelModifierDTOthat has the parameters that should be added to the tag, the model variables that should be added to the local model and theBroadleafTemplateModelthat should be added as the last child of the tag
-