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.
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
Constructor and Description |
---|
AjaxThymeleafViewResolver() |
Modifier and Type | Method and Description |
---|---|
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.
|
addStaticVariable, canHandle, getCharacterEncoding, getContentType, getExcludedViewNames, getOrder, getStaticVariables, getTemplateEngine, getViewClass, getViewNames, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setCharacterEncoding, setContentType, setExcludedViewNames, setOrder, setRedirectContextRelative, setRedirectHttp10Compatible, setStaticVariables, setTemplateEngine, setViewClass, setViewNames
clearCache, getCacheKey, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheUnresolved
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
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.
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.
ajaxHandler
- the AJAX handler.protected org.springframework.web.servlet.View createView(String viewName, Locale locale) throws Exception
createView
in class ThymeleafViewResolver
Exception
Copyright © 2016 The THYMELEAF team. All rights reserved.