Interface ForwardAsGetFormHelper

  • All Superinterfaces:
    FormHelper

    @ProviderType
    public interface ForwardAsGetFormHelper
    extends FormHelper
    Interface used for working with ACS-AEM-Commons forms.
    • Field Detail

      • REQUEST_ATTR_FORM_KEY

        static final String REQUEST_ATTR_FORM_KEY
    • Method Detail

      • getAction

        String getAction​(com.day.cq.wcm.api.Page page)
        Creates the action URL when posting to a Page (non AJAX call)
        Specified by:
        getAction in interface FormHelper
        Parameters:
        page -
        Returns:
      • forwardAsGet

        void forwardAsGet​(Form form,
                          org.apache.sling.api.resource.Resource resource,
                          org.apache.sling.api.SlingHttpServletRequest request,
                          org.apache.sling.api.SlingHttpServletResponse response,
                          org.apache.sling.api.request.RequestDispatcherOptions options)
                   throws javax.servlet.ServletException,
                          IOException
        Creates a synthetic GET request that can be used in the context of a real POST request to retrieve GET renditions of resources. This method is best used for AJAX-based forms, as the result on error is only the markup associated with the error-ing form (not the whole page)
        Parameters:
        form -
        resource -
        request -
        response -
        options -
        Throws:
        javax.servlet.ServletException
        IOException
      • forwardAsGet

        void forwardAsGet​(Form form,
                          org.apache.sling.api.resource.Resource resource,
                          org.apache.sling.api.SlingHttpServletRequest request,
                          org.apache.sling.api.SlingHttpServletResponse response)
                   throws javax.servlet.ServletException,
                          IOException
        Creates a synthetic GET request that can be used in the context of a real POST request to retrieve GET renditions of resources. This method is best used for AJAX-based forms, as the result on error is only the markup associated with the error-ing form (not the whole page) Same as above, but uses empty RequestDispatcherOptions.
        Parameters:
        form -
        resource -
        request -
        response -
        Throws:
        javax.servlet.ServletException
        IOException
      • forwardAsGet

        void forwardAsGet​(Form form,
                          com.day.cq.wcm.api.Page page,
                          org.apache.sling.api.SlingHttpServletRequest request,
                          org.apache.sling.api.SlingHttpServletResponse response)
                   throws javax.servlet.ServletException,
                          IOException
        Creates a synthetic GET request that can be used in the context of a real POST request to retrieve GET renditions of resources. This method is best used for full POST-back forms that perform a full synchronous POST on submission. Forces resourceType to "cq/Page" and removes all selectors.
        Parameters:
        form -
        page -
        request -
        response -
        Throws:
        javax.servlet.ServletException
        IOException
      • forwardAsGet

        void forwardAsGet​(Form form,
                          com.day.cq.wcm.api.Page page,
                          org.apache.sling.api.SlingHttpServletRequest request,
                          org.apache.sling.api.SlingHttpServletResponse response,
                          org.apache.sling.api.request.RequestDispatcherOptions options)
                   throws javax.servlet.ServletException,
                          IOException
        Same as forwardAsGet(Form form, Page pae, SlingHttpServletRequest request, SlingHttpServletResponse) except allows RequestDispatcherOptions to be passed in. Note; this WILL force a resourceType of "cq/Page" even if a previous "setForceResourceType" as been set on the options.
        Parameters:
        form -
        page -
        request -
        response -
        options -
        Throws:
        javax.servlet.ServletException
        IOException
      • forwardAsGet

        void forwardAsGet​(Form form,
                          String path,
                          org.apache.sling.api.SlingHttpServletRequest request,
                          org.apache.sling.api.SlingHttpServletResponse response,
                          org.apache.sling.api.request.RequestDispatcherOptions options)
                   throws javax.servlet.ServletException,
                          IOException
        /** Creates a synthetic GET request that can be used in the context of a real POST request to retrieve GET renditions of resources. This method is best used for a customized scenarios where the current resource or currentPage do not suffice. Note: BrowserMap JS may auto-redirect the result is a CQ Page that loads BrowserMap.
        Parameters:
        form -
        path -
        request -
        response -
        options -
        Throws:
        javax.servlet.ServletException
        IOException