Interface IAjaxExecutor

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void handleRequest​(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, com.helger.photon.app.PhotonUnifiedResponse aAjaxResponse)
      Called to handle a specific request.
      default void initExecution​(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)
      Initialization method that is called before the main execution is called.
      default void registerExternalResources()
      Registers all external resources (CSS or JS files) needed by controls potentially spawned by an AJAX request of this handler.
    • Method Detail

      • initExecution

        default void initExecution​(@Nonnull
                                   com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)
        Initialization method that is called before the main execution is called. This can e.g be used to determine the last modification date time.
        Parameters:
        aRequestScope - The request scope to be used, to extract parameters. Never null.
      • handleRequest

        void handleRequest​(@Nonnull
                           com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope,
                           @Nonnull
                           com.helger.photon.app.PhotonUnifiedResponse aAjaxResponse)
                    throws Exception
        Called to handle a specific request. The implementation of this method usually performs a server side task and fills the provided response object with e.g. binary data to download or HTML content to be evaluated by the calling HTML page. If this Ajax executor only executes something but delivers no result, at least the HTTP status 204 (No content) should be returned.
        Parameters:
        aRequestScope - the request scope values to be used. Never null.
        aAjaxResponse - The response object to be filled. Never null.
        Throws:
        Exception - Any exception if an error occurs.