Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.js.ajax.tiles2
Class AjaxTilesView

    java.lang.Object
      org.springframework.context.support.ApplicationObjectSupport
          org.springframework.web.context.support.WebApplicationObjectSupport
              org.springframework.web.servlet.view.AbstractView
                  org.springframework.web.servlet.view.AbstractUrlBasedView
                      org.springframework.web.servlet.view.tiles2.TilesView
                          org.springframework.js.ajax.tiles2.AjaxTilesView

All Implemented Interfaces:
  org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.View

Direct Known Subclasses:
  FlowAjaxTilesView

    public class AjaxTilesView

extends org.springframework.web.servlet.view.tiles2.TilesView

Tiles view implementation that is able to handle partial rendering for Spring Javascript Ajax requests.

This implementation uses the `SpringJavascriptAjaxHandler` by default to determine whether the current request is an Ajax request. On an Ajax request, a "fragments" parameter will be extracted from the request in order to determine which attributes to render from the current tiles view.

Author:
  Jeremy Grelle, David Winterfeldt

Field Summary

Fields inherited from class org.springframework.web.servlet.view.AbstractView
`DEFAULT_CONTENT_TYPE`

Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
`logger`

Fields inherited from interface org.springframework.web.servlet.View
`PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE`

Constructor Summary
`AjaxTilesView()`

Method Summary
`protected void` | `addRuntimeAttributes(org.apache.tiles.impl.BasicTilesContainer container, java.util.Map resultMap, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Iterate over dynamically added Tiles attributes (see "Runtime Composition" in the Tiles documentation) and add them to the output Map passed as input.
`void` | `afterPropertiesSet()`
`protected void` | `flattenAttributeMap(org.apache.tiles.impl.BasicTilesContainer container, org.apache.tiles.context.TilesRequestContext requestContext, java.util.Map resultMap, org.apache.tiles.Definition compositeDefinition, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Iterate over all attributes in the given Tiles definition.
`AjaxHandler` | `getAjaxHandler()`
`protected java.lang.String[]` | `getRenderFragments(java.util.Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
`protected void` | `renderMergedOutputModel(java.util.Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)`
`void` | `setAjaxHandler(AjaxHandler ajaxHandler)`

Methods inherited from class org.springframework.web.servlet.view.tiles2.TilesView
`checkResource`

Methods inherited from class org.springframework.web.servlet.view.AbstractUrlBasedView
`getUrl, isUrlRequired, setUrl, toString`

Methods inherited from class org.springframework.web.servlet.view.AbstractView
`addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponse`

Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
`getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext`

Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
`getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AjaxTilesView

    public AjaxTilesView()

Method Detail

### afterPropertiesSet

    public void afterPropertiesSet()
                            throws java.lang.Exception

  Specified by:
    `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
  Overrides:
    `afterPropertiesSet` in class `org.springframework.web.servlet.view.AbstractUrlBasedView`
  Throws:
    `java.lang.Exception`

### getAjaxHandler

    public AjaxHandler getAjaxHandler()

### setAjaxHandler

    public void setAjaxHandler(AjaxHandler ajaxHandler)

### renderMergedOutputModel

    protected void renderMergedOutputModel(java.util.Map model,
                                           javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response)
                                    throws java.lang.Exception

  Overrides:
    `renderMergedOutputModel` in class `org.springframework.web.servlet.view.tiles2.TilesView`
  Throws:
    `java.lang.Exception`

### getRenderFragments

    protected java.lang.String[] getRenderFragments(java.util.Map model,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)

### flattenAttributeMap

    protected void flattenAttributeMap(org.apache.tiles.impl.BasicTilesContainer container,
                                       org.apache.tiles.context.TilesRequestContext requestContext,
                                       java.util.Map resultMap,
                                       org.apache.tiles.Definition compositeDefinition,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)

  Iterate over all attributes in the given Tiles definition. Every attribute value that represents a template (i.e. start with "/") or is a nested definition is added to a Map. The method class itself recursively to traverse nested definitions.

  Parameters:
    `container` - the TilesContainer
    `requestContext` - the TilesRequestContext
    `resultMap` - the output Map where attributes of interest are added to.
    `compositeDefinition` - the definition to search for attributes of interest.
    `request` - the servlet request
    `response` - the servlet response

### addRuntimeAttributes

    protected void addRuntimeAttributes(org.apache.tiles.impl.BasicTilesContainer container,
                                        java.util.Map resultMap,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response)

  Iterate over dynamically added Tiles attributes (see "Runtime Composition" in the Tiles documentation) and add them to the output Map passed as input.

  Parameters:
    `container` - the Tiles container
    `resultMap` - the output Map where attributes of interest are added to.
    `request` - the Servlet request
    `response` - the Servlet response

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD