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 fragment names in a request parameter called fragments, and for each of them:
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 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.
|
getFragmentSpec, renderFragment, setFragmentSpec
addRequestContextAsVariable, addStaticVariable, getBeanName, getCharacterEncoding, getContentType, getLocale, getStaticVariables, getTemplateEngine, getTemplateName, isContentTypeSet, setBeanName, setCharacterEncoding, setContentType, setLocale, setStaticVariables, setTemplateEngine, setTemplateName
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, initApplicationContext, 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 © 2016 The THYMELEAF team. All rights reserved.