Class BroadleafControllerUtility

java.lang.Object
org.broadleafcommerce.common.web.controller.BroadleafControllerUtility

public class BroadleafControllerUtility extends Object
Commonly used Broadleaf Controller operations. - ajaxRedirects - isAjaxRequest - ajaxRender

BroadleafAbstractController provides convenience methods for this functionality. Implementors who are not able (or willing) to have their Controllers extend BroadleafAbstractController can utilize this utility class to achieve some of the same benefits.

Author:
bpolster
  • Field Details

    • BLC_REDIRECT_ATTRIBUTE

      public static final String BLC_REDIRECT_ATTRIBUTE
      See Also:
    • BLC_AJAX_PARAMETER

      public static final String BLC_AJAX_PARAMETER
      See Also:
    • LOG

      protected static final org.apache.commons.logging.Log LOG
  • Constructor Details

    • BroadleafControllerUtility

      public BroadleafControllerUtility()
  • Method Details

    • isAjaxRequest

      public static boolean isAjaxRequest(jakarta.servlet.http.HttpServletRequest request)
      A helper method that returns whether or not the given request was invoked via an AJAX call

      Returns true if the request contains the XMLHttpRequest header or a blcAjax=true parameter.

      Parameters:
      request -
      Returns:
      - whether or not it was an AJAX request
    • isAjaxRequest

      public static boolean isAjaxRequest(org.springframework.web.context.request.WebRequest request)