thymeleaf expression object dialects

Solutions on MaxInterview for thymeleaf expression object dialects by the best coders in the world

showing results for - "thymeleaf expression object dialects"
Darin
23 Jan 2017
1public class MyDialect extends AbstractDialect implements IExpressionEnhancingDialect {
2
3  public MyDialect() {
4    super();
5  }
6
7  @Override
8  public String getPrefix() {
9    // @see org.thymeleaf.dialect.IDialect#getPrefix
10    return "xxx";
11  }
12
13  @Override
14  public boolean isLenient() {
15    return false;
16  }
17
18  @Override
19  public Map<String, Object> getAdditionalExpressionObjects(IProcessingContext ctx) {
20    Map<String, Object> expressions = new HashMap<>();
21    expressions.put("labels", new LabelUtil());
22    return expressions;
23  }
24}
25@Configuration
26public class ThymeleafConfig {
27
28  @Bean
29  public MyDialect myDialect() {
30    return new MyDialect();
31  }
32}