Class AjaxThymeleafViewResolver

Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractCachingViewResolver
org.thymeleaf.spring6.view.ThymeleafViewResolver
org.thymeleaf.spring6.webflow.view.AjaxThymeleafViewResolver
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.core.Ordered, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.ViewResolver

public class AjaxThymeleafViewResolver extends ThymeleafViewResolver

Subclass of ThymeleafViewResolver adding compatibility with AJAX-based events (redirects) in Spring WebFlow.

Important: Spring WebFlow dependencies are OPTIONAL. If you are not using WebFlow in your application, then you should be using ThymeleafViewResolver directly.

Since:
3.0.3
Author:
Daniel Fernández
  • Constructor Details

    • AjaxThymeleafViewResolver

      public AjaxThymeleafViewResolver()
  • Method Details

    • getAjaxHandler

      public org.springframework.webflow.context.servlet.AjaxHandler getAjaxHandler()

      Return the AJAX handler (from Spring Javascript) used to determine whether a request is an AJAX request or not in views resolved by this resolver.

      An instance of DefaultAjaxHandler is set by default.

      Returns:
      the AJAX handler.
    • setAjaxHandler

      public void setAjaxHandler(org.springframework.webflow.context.servlet.AjaxHandler ajaxHandler)

      Sets the AJAX handler (from Spring Javascript) used to determine whether a request is an AJAX request or not in views resolved by this resolver.

      An instance of DefaultAjaxHandler is set by default.

      Parameters:
      ajaxHandler - the AJAX handler.
    • createView

      protected org.springframework.web.servlet.View createView(String viewName, Locale locale) throws Exception
      Overrides:
      createView in class ThymeleafViewResolver
      Throws:
      Exception