public class AjaxThymeleafView extends ThymeleafView implements AjaxEnabledView
Subclass of ThymeleafView
adding compatibility with AJAX events in
Spring JavaScript (part of Spring WebFlow). This allows this View implementation
to be able to return only fragments of the page.
These rendering of fragments is used, for example, in Spring WebFlow's <render> instructions (though not only).
This view searches for a comma-separated list of markup selectors in a request parameter called fragments.
DEFAULT_CONTENT_TYPE
Constructor and Description |
---|
AjaxThymeleafView() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected Set<String> |
getRenderFragments(Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
render(Map<String,?> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
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.
|
getMarkupSelector, renderFragment, setMarkupSelector
addRequestContextAsVariable, addStaticVariable, getBeanName, getCharacterEncoding, getContentType, getForceContentType, getLocale, getStaticVariables, getTemplateEngine, getTemplateName, isContentTypeSet, isForceContentTypeSet, setBeanName, setCharacterEncoding, setContentType, setForceContentType, setLocale, setStaticVariables, setTemplateEngine, setTemplateName
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
public org.springframework.js.ajax.AjaxHandler getAjaxHandler()
AjaxEnabledView
Return the AJAX handler (from Spring Javascript) used to determine whether a request is an AJAX request or not.
Views implementing this interface should be used with an instance of
AjaxThymeleafViewResolver
or any of its subclasses,
so that AjaxEnabledView.setAjaxHandler(AjaxHandler)
can be called by
the resolver when resolving the view, setting the default
AJAX handler being used.
getAjaxHandler
in interface AjaxEnabledView
public void setAjaxHandler(org.springframework.js.ajax.AjaxHandler ajaxHandler)
AjaxEnabledView
Sets the AJAX handler (from Spring Javascript) used to determine whether a request is an AJAX request or not.
Views implementing this interface should be used with an instance of
AjaxThymeleafViewResolver
or any of its subclasses,
so that this method can be called by
the resolver when resolving the view, setting the default
AJAX handler being used.
setAjaxHandler
in interface AjaxEnabledView
ajaxHandler
- the AJAX handler.public void render(Map<String,?> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
render
in interface org.springframework.web.servlet.View
render
in class ThymeleafView
Exception
Copyright © 2017 The THYMELEAF team. All rights reserved.