use of nz.net.ultraq.thymeleaf.LayoutDialect in project irida by phac-nml.
the class IridaUIWebConfig method additionalDialects.
/**
* This is to add additional Thymeleaf dialects.
*
* @return A Set of Thymeleaf dialects.
*/
private Set<IDialect> additionalDialects() {
Set<IDialect> dialects = new HashSet<>();
dialects.add(new SpringSecurityDialect());
dialects.add(new LayoutDialect());
dialects.add(new DataAttributeDialect());
return dialects;
}
use of nz.net.ultraq.thymeleaf.LayoutDialect in project spring-boot by spring-projects.
the class ThymeleafAutoConfigurationTests method layoutDialectCanBeCustomized.
@Test
public void layoutDialectCanBeCustomized() throws Exception {
this.context.register(LayoutDialectConfiguration.class);
this.context.refresh();
LayoutDialect layoutDialect = this.context.getBean(LayoutDialect.class);
assertThat(ReflectionTestUtils.getField(layoutDialect, "sortingStrategy")).isInstanceOf(GroupingStrategy.class);
}
use of nz.net.ultraq.thymeleaf.LayoutDialect in project tutorials by eugenp.
the class WebMVCConfig method templateEngine.
private TemplateEngine templateEngine(ITemplateResolver templateResolver) {
SpringTemplateEngine engine = new SpringTemplateEngine();
engine.addDialect(new LayoutDialect(new GroupingStrategy()));
engine.addDialect(new Java8TimeDialect());
engine.setTemplateResolver(templateResolver);
engine.setTemplateEngineMessageSource(messageSource());
return engine;
}
Aggregations