Package org.thymeleaf.spring4.expression

Examples of org.thymeleaf.spring4.expression.ThymeleafEvaluationContext



        // Expose Thymeleaf's own evaluation context as a model variable
        final ConversionService conversionService =
                (ConversionService) request.getAttribute(ConversionService.class.getName()); // might be null!
        final ThymeleafEvaluationContext evaluationContext =
                new ThymeleafEvaluationContext(applicationContext, conversionService);
        mergedModel.put(ThymeleafEvaluationContext.THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME, evaluationContext);

       
        final SpringWebContext context =
                new SpringWebContext(request, response, servletContext, getLocale(), mergedModel, getApplicationContext());
View Full Code Here


            springWebContext.getHttpServletRequest(), springWebContext.getHttpServletResponse(), springWebContext.getServletContext(), springWebContext.getVariables());
        springWebContext.setVariable(SPRING_REQUEST_CONTEXT, requestContext);
    }

    private void createEvaluationContext(final ConversionService conversionService) {
        ThymeleafEvaluationContext evaluationContext = new ThymeleafEvaluationContext(springWebContext.getApplicationContext(), conversionService);
        evaluationContext.setTypeLocator(new WhitelistTypeLocator());
        springWebContext.setVariable(THYMELEAF_EVALUATION_CONTEXT_CONTEXT_VARIABLE_NAME, evaluationContext);
    }
View Full Code Here

        return tilesConfigurer;
    }

    @Bean
    public SpringTemplateEngine templateEngine(ClassLoaderTemplateResolver templateResolver) {
        SpringTemplateEngine templateEngine = new SpringTemplateEngine();
        templateEngine.setTemplateResolver(templateResolver);
        templateEngine.addDialect(new TilesDialect());
        return templateEngine;
    }
View Full Code Here

        return templateResolver;
    }

    @Bean
    public SpringTemplateEngine templateEngine(){
        SpringTemplateEngine templateEngine = new SpringTemplateEngine();
        templateEngine.setTemplateResolver(templateResolver());
        return templateEngine;
    }
View Full Code Here

        return templateResolver;
    }

    @Bean
    public SpringTemplateEngine templateEngine(){
        SpringTemplateEngine templateEngine = new SpringTemplateEngine();
        templateEngine.setTemplateResolver(templateResolver());
        return templateEngine;
    }
View Full Code Here

@Configuration
public class Config extends WebMvcConfigurerAdapter {

  @Bean
  public SpringTemplateEngine templateEngine() {
    SpringTemplateEngine templateEngine = new SpringTemplateEngine();
    Set<TemplateResolver> templateResolvers = new java.util.HashSet<TemplateResolver>();
    templateResolvers.add(webTemplateResolver());
    templateEngine.setTemplateResolvers(templateResolvers);
    Set<IDialect> additionalDialects = new HashSet<IDialect>();
    additionalDialects.add(new TilesDialect());
    templateEngine.setAdditionalDialects(additionalDialects);
    return templateEngine;
  }
View Full Code Here

        return templateResolver;
    }

    @Bean
    public SpringTemplateEngine templateEngine() {
        SpringTemplateEngine templateEngine = new SpringTemplateEngine();
        templateEngine.setTemplateResolver(templateResolver());
        templateEngine.addDialect(new SpringSecurityDialect());
        return templateEngine;
    }
View Full Code Here

        return templateResolver;
    }

    @Bean
    public SpringTemplateEngine templateEngine() {
        SpringTemplateEngine templateEngine = new SpringTemplateEngine();
        templateEngine.setTemplateResolver(templateResolver());
        templateEngine.addDialect(new SpringSecurityDialect());
        return templateEngine;
    }
View Full Code Here

    @Autowired(required = false)
    private final Collection<IDialect> dialects = Collections.emptySet();

    @Bean
    public SpringTemplateEngine templateEngine() {
      SpringTemplateEngine engine = new SpringTemplateEngine();
      for (ITemplateResolver templateResolver : this.templateResolvers) {
        engine.addTemplateResolver(templateResolver);
      }
      for (IDialect dialect : this.dialects) {
        engine.addDialect(dialect);
      }
      return engine;
    }
View Full Code Here

    return viewResolver;
  }

  @Bean
  public SpringTemplateEngine templateEngine(TemplateResolver templateResolver) {
    SpringTemplateEngine templateEngine = new SpringTemplateEngine();
    templateEngine.setTemplateResolver(templateResolver);
    templateEngine.addDialect(new SpringSocialDialect());
    return templateEngine;
  }
View Full Code Here

TOP

Related Classes of org.thymeleaf.spring4.expression.ThymeleafEvaluationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.