Provides a convenient way to specify AbstractTemplateView's exposure
flags for request attributes, session attributes, and Spring's macro helpers.
AbstractTemplateView, org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected AbstractUrlBasedView | buildView(String
the name of the view to build viewName)Overrides org. Creates a new View instance of the specified view class and configures it. |
| protected Class | requiredViewClass()
Overrides org. Return the required type of view for this resolver. |
| public void | setAllowRequestOverride(boolean allowRequestOverride)
Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. |
| public void | setAllowSessionOverride(boolean allowSessionOverride)
Set whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. |
| public void | setExposeRequestAttributes(boolean exposeRequestAttributes)
Set whether all request attributes should be added to the model prior to merging with the template. |
| public void | setExposeSessionAttributes(boolean exposeSessionAttributes)
Set whether all HttpSession attributes should be added to the model prior to merging with the template. |
| public void | setExposeSpringMacroHelpers(boolean exposeSpringMacroHelpers)
Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext". |
| allowRequestOverride | back to summary |
|---|---|
| private boolean allowRequestOverride | |
| allowSessionOverride | back to summary |
|---|---|
| private boolean allowSessionOverride | |
| exposeRequestAttributes | back to summary |
|---|---|
| private boolean exposeRequestAttributes | |
| exposeSessionAttributes | back to summary |
|---|---|
| private boolean exposeSessionAttributes | |
| exposeSpringMacroHelpers | back to summary |
|---|---|
| private boolean exposeSpringMacroHelpers | |
| AbstractTemplateViewResolver | back to summary |
|---|---|
| public AbstractTemplateViewResolver() | |
| buildView | back to summary |
|---|---|
| protected AbstractUrlBasedView buildView(String viewName) throws Exception Overrides org. Doc from org. Creates a new View instance of the specified view class and configures it. Does not perform any lookup for pre-defined View instances. Spring lifecycle methods as defined by the bean container do not have to
be called here; those will be applied by the Subclasses will typically call
| |
| requiredViewClass | back to summary |
|---|---|
| protected Class Overrides org. Doc from org. Return the required type of view for this resolver.
This implementation returns
| |
| setAllowRequestOverride | back to summary |
|---|---|
| public void setAllowRequestOverride(boolean allowRequestOverride) 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 | back to summary |
|---|---|
| public void setAllowSessionOverride(boolean allowSessionOverride) 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 | back to summary |
|---|---|
| public void setExposeRequestAttributes(boolean exposeRequestAttributes) Set whether all request attributes should be added to the model prior to merging with the template. Default is "false". | |
| setExposeSessionAttributes | back to summary |
|---|---|
| public void setExposeSessionAttributes(boolean exposeSessionAttributes) Set whether all HttpSession attributes should be added to the model prior to merging with the template. Default is "false". | |
| setExposeSpringMacroHelpers | back to summary |
|---|---|
| public void setExposeSpringMacroHelpers(boolean exposeSpringMacroHelpers) Set whether to expose a RequestContext for use by Spring's macro library, under the name "springMacroRequestContext". Default is "true". | |