Interface ForwardAsGetFormHelper
-
- All Superinterfaces:
FormHelper
@ProviderType public interface ForwardAsGetFormHelper extends FormHelper
Interface used for working with ACS-AEM-Commons forms.
-
-
Field Summary
Fields Modifier and Type Field Description static StringREQUEST_ATTR_FORM_KEY-
Fields inherited from interface com.adobe.acs.commons.forms.helpers.FormHelper
DEFAULT_FORM_SELECTOR, EXTENSION, FORM_NAME_INPUT, FORM_RESOURCE_INPUT, SERVICE_RANKING_BASE, SERVICE_RANKING_FORWARD_AS_GET, SERVICE_RANKING_POST_REDIRECT_GET, SERVICE_RANKING_POST_REDIRECT_WITH_COOKIES_GET
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidforwardAsGet(Form form, com.day.cq.wcm.api.Page page, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)Creates a synthetic GET request that can be used in the context of a real POST request to retrieve GET renditions of resources.voidforwardAsGet(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)Same as forwardAsGet(Form form, Page pae, SlingHttpServletRequest request, SlingHttpServletResponse) except allows RequestDispatcherOptions to be passed in.voidforwardAsGet(Form form, String path, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, org.apache.sling.api.request.RequestDispatcherOptions options)/** Creates a synthetic GET request that can be used in the context of a real POST request to retrieve GET renditions of resources.voidforwardAsGet(Form form, org.apache.sling.api.resource.Resource resource, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)Creates a synthetic GET request that can be used in the context of a real POST request to retrieve GET renditions of resources.voidforwardAsGet(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)Creates a synthetic GET request that can be used in the context of a real POST request to retrieve GET renditions of resources.StringgetAction(com.day.cq.wcm.api.Page page)Creates the action URL when posting to a Page (non AJAX call)-
Methods inherited from interface com.adobe.acs.commons.forms.helpers.FormHelper
getAction, getAction, getAction, getAction, getAction, getForm, getForm, getFormInputsHTML, getFormSelector, renderForm, renderForm, renderForm, renderOtherForm, renderOtherForm, renderOtherForm
-
-
-
-
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:
getActionin interfaceFormHelper- 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.ServletExceptionIOException
-
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.ServletExceptionIOException
-
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.ServletExceptionIOException
-
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.ServletExceptionIOException
-
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.ServletExceptionIOException
-
-