use of org.thymeleaf.model.IModelFactory in project thymeleaf-tests by thymeleaf.
the class ReplaceWithProcessableCDATASectionProcessor method doProcess.
@Override
protected void doProcess(final ITemplateContext context, final ICDATASection cdataSection, final ICDATASectionStructureHandler structureHandler) {
final IModelFactory modelFactory = context.getModelFactory();
final IStandaloneElementTag tag = modelFactory.createStandaloneElementTag("replaced", "th:text", "one", false, true);
final IModel model = modelFactory.createModel(tag);
structureHandler.replaceWith(model, true);
}
use of org.thymeleaf.model.IModelFactory in project thymeleaf-tests by thymeleaf.
the class ReplaceWithProcessableCommentProcessor method doProcess.
@Override
protected void doProcess(final ITemplateContext context, final IComment comment, final ICommentStructureHandler structureHandler) {
final IModelFactory modelFactory = context.getModelFactory();
final IStandaloneElementTag tag = modelFactory.createStandaloneElementTag("replaced", "th:text", "one", false, true);
final IModel model = modelFactory.createModel(tag);
structureHandler.replaceWith(model, true);
}
use of org.thymeleaf.model.IModelFactory in project thymeleaf-tests by thymeleaf.
the class ReplaceWithProcessableProcessingInstructionProcessor method doProcess.
@Override
protected void doProcess(final ITemplateContext context, final IProcessingInstruction processingInstruction, final IProcessingInstructionStructureHandler structureHandler) {
final IModelFactory modelFactory = context.getModelFactory();
final IStandaloneElementTag tag = modelFactory.createStandaloneElementTag("replaced", "th:text", "one", false, true);
final IModel model = modelFactory.createModel(tag);
structureHandler.replaceWith(model, true);
}
use of org.thymeleaf.model.IModelFactory in project thymeleaf-tests by thymeleaf.
the class ReplaceWithProcessableTextProcessor method doProcess.
@Override
protected void doProcess(final ITemplateContext context, final IText text, final ITextStructureHandler structureHandler) {
if (EngineEventUtils.isWhitespace(text) || text.getText().equals("one")) {
return;
}
final IModelFactory modelFactory = context.getModelFactory();
final IStandaloneElementTag tag = modelFactory.createStandaloneElementTag("replaced", "th:text", "one", false, true);
final IModel model = modelFactory.createModel(tag);
structureHandler.replaceWith(model, true);
}
use of org.thymeleaf.model.IModelFactory in project thymeleaf-tests by thymeleaf.
the class Dialect01DivProcessor method doProcess.
@Override
protected void doProcess(final ITemplateContext processingContext, final IProcessableElementTag tag, final IElementTagStructureHandler structureHandler) {
final IModelFactory modelFactory = processingContext.getModelFactory();
final IModel markup = modelFactory.createModel();
markup.add(modelFactory.createText("[From Dialect 01]"));
structureHandler.insertImmediatelyAfter(markup, true);
}
Aggregations