spring-framework / org.springframework.web.servlet.view.groovy / GroovyMarkupViewResolver

GroovyMarkupViewResolver

open class GroovyMarkupViewResolver : AbstractTemplateViewResolver

Convenience subclass of @link AbstractTemplateViewResolver} that supports GroovyMarkupView (i.e. Groovy XML/XHTML markup templates) and custom subclasses of it.

The view class for all views created by this resolver can be specified via the #setViewClass(Class) property.

Note: When chaining ViewResolvers this resolver will check for the existence of the specified template resources and only return a non-null View object if a template is actually found.

Author
Brian Clozel

Since
4.1

See Also
GroovyMarkupConfigurer

Constructors

<init>

GroovyMarkupViewResolver()

Sets the default view class to #requiredViewClass: by default GroovyMarkupView.

GroovyMarkupViewResolver(prefix: String, suffix: String)

A convenience constructor that allows for specifying prefix and suffix as constructor arguments.

Inherited Functions

setAllowRequestOverride

open fun setAllowRequestOverride(allowRequestOverride: Boolean): Unit

Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. Default is "false", which causes an exception to be thrown if request attributes of the same name as model attributes are found.

setAllowSessionOverride

open fun setAllowSessionOverride(allowSessionOverride: Boolean): Unit

Set whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. Default is "false", which causes an exception to be thrown if session attributes of the same name as model attributes are found.

setExposeRequestAttributes

open fun setExposeRequestAttributes(exposeRequestAttributes: Boolean): Unit

Set whether all request attributes should be added to the model prior to merging with the template. Default is "false".

setExposeSessionAttributes

open fun setExposeSessionAttributes(exposeSessionAttributes: Boolean): Unit

Set whether all HttpSession attributes should be added to the model prior to merging with the template. Default is "false".

setExposeSpringMacroHelpers

open fun setExposeSpringMacroHelpers(exposeSpringMacroHelpers: Boolean): Unit

Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext". Default is "true".