Class AjaxUtils


  • public class AjaxUtils
    extends Object
    Some AJAX related utility functions.
    • Method Detail

      • executeIfAjax

        public static void executeIfAjax​(org.danekja.java.util.function.serializable.SerializableConsumer<AjaxRequestTarget> ajaxAction)
        Runs action if current request is of type "AJAX". Otherwise, nothing is done.
        Parameters:
        ajaxAction - The action to run a SerializableConsumer
      • executeIfAjaxOrWebSockets

        public static void executeIfAjaxOrWebSockets​(org.danekja.java.util.function.serializable.SerializableConsumer<IPartialPageRequestHandler> ajaxAction)
        Runs action if current request is of type "AJAX" or a Websockets request. Otherwise, nothing is done.
        Parameters:
        ajaxAction - The action to run a SerializableConsumer