org.thymeleaf.spring4.view
Class AjaxThymeleafViewResolver

Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.view.AbstractCachingViewResolver
              extended by org.thymeleaf.spring4.view.ThymeleafViewResolver
                  extended by org.thymeleaf.spring4.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:
2.0.11
Author:
Daniel Fernández

Field Summary
 
Fields inherited from class org.thymeleaf.spring4.view.ThymeleafViewResolver
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
 
Fields inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
DEFAULT_CACHE_LIMIT
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
AjaxThymeleafViewResolver()
           
 
Method Summary
protected  org.springframework.web.servlet.View createView(String viewName, Locale locale)
           
 org.springframework.js.ajax.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.
 void setAjaxHandler(org.springframework.js.ajax.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.
 
Methods inherited from class org.thymeleaf.spring4.view.ThymeleafViewResolver
addStaticVariable, canHandle, getCharacterEncoding, getContentType, getExcludedViewNames, getOrder, getStaticVariables, getTemplateEngine, getViewClass, getViewNames, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setCharacterEncoding, setContentType, setExcludedViewNames, setOrder, setRedirectContextRelative, setRedirectHttp10Compatible, setStaticVariables, setTemplateEngine, setViewClass, setViewNames
 
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
clearCache, getCacheKey, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheLimit, setCacheUnresolved
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AjaxThymeleafViewResolver

public AjaxThymeleafViewResolver()
Method Detail

getAjaxHandler

public org.springframework.js.ajax.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 SpringJavascriptAjaxHandler is set by default.

Returns:
the AJAX handler.

setAjaxHandler

public void setAjaxHandler(org.springframework.js.ajax.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 SpringJavascriptAjaxHandler 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


Copyright © 2013 The THYMELEAF team. All Rights Reserved.