public class SpringJavascriptAjaxHandler extends Object implements AjaxHandler
Modifier and Type | Field and Description |
---|---|
static String |
AJAX_ACCEPT_CONTENT_TYPE
The accept header value that signifies an Ajax request.
|
static String |
AJAX_SOURCE_PARAM
Alternate request parameter to indicate an Ajax request for cases when control of the header is not available.
|
static String |
POPUP_VIEW_HEADER
The response header to be set on an redirect that should be issued from a popup window.
|
static String |
REDIRECT_URL_HEADER
The response header to be set on an Ajax redirect
|
Constructor and Description |
---|
SpringJavascriptAjaxHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
isAjaxRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Is the current request an Ajax request?
|
void |
sendAjaxRedirect(String targetUrl,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean popup)
Send a redirect request to the Ajax client.
|
public static final String REDIRECT_URL_HEADER
public static final String POPUP_VIEW_HEADER
public static final String AJAX_ACCEPT_CONTENT_TYPE
public static final String AJAX_SOURCE_PARAM
public boolean isAjaxRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
AjaxHandler
isAjaxRequest
in interface AjaxHandler
request
- the current requestresponse
- the current responsepublic void sendAjaxRedirect(String targetUrl, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean popup) throws IOException
AjaxHandler
sendAjaxRedirect
in interface AjaxHandler
targetUrl
- the target url to redirect torequest
- the current requestresponse
- the current responsepopup
- wheter the redirect should be sent from a new popup dialog windowIOException