Interface AjaxHandler

All Known Implementing Classes:
AbstractAjaxHandler, DefaultAjaxHandler, JsfAjaxHandler

public interface AjaxHandler
Strategy interface that encapsulates knowledge about a client-side ajax system and how to communicate with that system.
Author:
Keith Donald
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isAjaxRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Is the current request an Ajax request?
    void
    sendAjaxRedirect(String targetUrl, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean popup)
    Send a redirect request to the Ajax client.
  • Method Details

    • isAjaxRequest

      boolean isAjaxRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Is the current request an Ajax request?
      Parameters:
      request - the current request
      response - the current response
    • sendAjaxRedirect

      void sendAjaxRedirect(String targetUrl, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean popup) throws IOException
      Send a redirect request to the Ajax client. This should cause the client-side agent to send a new request to the specified target url.
      Parameters:
      request - the current request
      response - the current response
      targetUrl - the target url to redirect to
      popup - whether the redirect should be sent from a new popup dialog window
      Throws:
      IOException