Spring Web Flow

org.springframework.js.ajax
Class SpringJavascriptAjaxHandler

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.js.ajax.AbstractAjaxHandler
              extended by org.springframework.js.ajax.SpringJavascriptAjaxHandler
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, AjaxHandler, org.springframework.web.context.ServletContextAware

public class SpringJavascriptAjaxHandler
extends AbstractAjaxHandler

Ajax handler for Spring Javascript (Spring.js).

Author:
Jeremy Grelle, Keith Donald
See Also:
AbstractAjaxHandler

Field Summary
static java.lang.String AJAX_ACCEPT_CONTENT_TYPE
          The accept header value that signifies an Ajax request.
static java.lang.String AJAX_SOURCE_PARAM
          Alternate request parameter to indicate an Ajax request for cases when control of the header is not available.
static java.lang.String POPUP_VIEW_HEADER
          The response header to be set on an redirect that should be issued from a popup window.
static java.lang.String REDIRECT_URL_HEADER
          The response header to be set on an Ajax redirect
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
SpringJavascriptAjaxHandler()
          Create a SpringJavascriptAjaxHandler that is not part of a chain of AjaxHandler's.
SpringJavascriptAjaxHandler(AbstractAjaxHandler delegate)
          Create a SpringJavascriptAjaxHandler as part of a chain of AjaxHandler's.
 
Method Summary
protected  boolean isAjaxRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void sendAjaxRedirectInternal(java.lang.String targetUrl, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean popup)
           
 
Methods inherited from class org.springframework.js.ajax.AbstractAjaxHandler
isAjaxRequest, sendAjaxRedirect
 
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, toString, wait, wait, wait
 

Field Detail

REDIRECT_URL_HEADER

public static final java.lang.String REDIRECT_URL_HEADER
The response header to be set on an Ajax redirect

See Also:
Constant Field Values

POPUP_VIEW_HEADER

public static final java.lang.String POPUP_VIEW_HEADER
The response header to be set on an redirect that should be issued from a popup window.

See Also:
Constant Field Values

AJAX_ACCEPT_CONTENT_TYPE

public static final java.lang.String AJAX_ACCEPT_CONTENT_TYPE
The accept header value that signifies an Ajax request.

See Also:
Constant Field Values

AJAX_SOURCE_PARAM

public static final java.lang.String AJAX_SOURCE_PARAM
Alternate request parameter to indicate an Ajax request for cases when control of the header is not available.

See Also:
Constant Field Values
Constructor Detail

SpringJavascriptAjaxHandler

public SpringJavascriptAjaxHandler()
Create a SpringJavascriptAjaxHandler that is not part of a chain of AjaxHandler's.


SpringJavascriptAjaxHandler

public SpringJavascriptAjaxHandler(AbstractAjaxHandler delegate)
Create a SpringJavascriptAjaxHandler as part of a chain of AjaxHandler's.

Method Detail

isAjaxRequestInternal

protected boolean isAjaxRequestInternal(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response)
Specified by:
isAjaxRequestInternal in class AbstractAjaxHandler

sendAjaxRedirectInternal

protected void sendAjaxRedirectInternal(java.lang.String targetUrl,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        boolean popup)
                                 throws java.io.IOException
Specified by:
sendAjaxRedirectInternal in class AbstractAjaxHandler
Throws:
java.io.IOException

Spring Web Flow