use of org.thymeleaf.model.IModel in project thymeleaf-tests by thymeleaf.
the class ReplaceWithProcessableDocTypeProcessor method doProcess.
@Override
protected void doProcess(final ITemplateContext context, final IDocType docType, final IDocTypeStructureHandler 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.IModel in project thymeleaf-tests by thymeleaf.
the class ReplaceWithProcessableXMLDeclarationProcessor method doProcess.
@Override
protected void doProcess(final ITemplateContext context, final IXMLDeclaration xmlDeclaration, final IXMLDeclarationStructureHandler 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.IModel in project thymeleaf-tests by thymeleaf.
the class Dialect02Div2Processor 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 02-2]"));
structureHandler.insertBefore(markup);
}
use of org.thymeleaf.model.IModel in project thymeleaf-tests by thymeleaf.
the class Dialect02DivProcessor 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 02]"));
structureHandler.insertImmediatelyAfter(markup, true);
}
use of org.thymeleaf.model.IModel in project thymeleaf by thymeleaf.
the class StandardModelFactory method createModel.
public IModel createModel(final ITemplateEvent event) {
final Model model = new Model(this.configuration, this.templateMode);
model.add(event);
return model;
}
Aggregations