@ProviderType
public interface FormHelper
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_FORM_SELECTOR |
static String |
EXTENSION |
static String |
FORM_NAME_INPUT |
static String |
FORM_RESOURCE_INPUT |
static int |
SERVICE_RANKING_BASE |
static int |
SERVICE_RANKING_FORWARD_AS_GET |
static int |
SERVICE_RANKING_POST_REDIRECT_GET |
static int |
SERVICE_RANKING_POST_REDIRECT_WITH_COOKIES_GET |
| Modifier and Type | Method and Description |
|---|---|
String |
getAction(com.day.cq.wcm.api.Page page)
Builds the form's action URI based on the provided page's path
|
String |
getAction(com.day.cq.wcm.api.Page page,
String formSelector)
Builds the form's action URI based on the provided page's path
|
String |
getAction(org.apache.sling.api.resource.Resource resource)
Builds the form's action URI based on the provided resource's path
|
String |
getAction(org.apache.sling.api.resource.Resource resource,
String formSelector)
Builds the form's action URI based on the provided resource's path
|
String |
getAction(String path)
Builds the form's action URI based on the provided path
|
String |
getAction(String path,
String formSelector)
Builds the form's action URI based on the provided path
|
Form |
getForm(String formName,
org.apache.sling.api.SlingHttpServletRequest request)
Gets the From from either the POST Requests parameters or the GET
request's (synthetic) attributes.
|
Form |
getForm(String formName,
org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
Gets the From from either the POST Requests parameters or the GET
request's (synthetic) attributes.
|
String |
getFormInputsHTML(Form form,
String... keys)
Returns a series of hidden fields used to persist multi-page form data
between forms.
|
String |
getFormSelector(org.apache.sling.api.SlingHttpServletRequest slingRequest)
Gets the Form Selector for the form POST request.
|
void |
renderForm(Form form,
com.day.cq.wcm.api.Page page,
org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
Wrapped method to create a interface from FormHelper to normalize APIs that are commonly used.
|
void |
renderForm(Form form,
org.apache.sling.api.resource.Resource resource,
org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
Wrapped method to create a interface from FormHelper to normalize APIs that are commonly used.
|
void |
renderForm(Form form,
String path,
org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
Wrapped method to create a interface from FormHelper to normalize APIs that are commonly used.
|
void |
renderOtherForm(Form form,
com.day.cq.wcm.api.Page page,
String selectors,
org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
Wrapped method to create a interface from FormHelper to normalize APIs that are commonly used.
|
void |
renderOtherForm(Form form,
org.apache.sling.api.resource.Resource resource,
String selectors,
org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
Wrapped method to create a interface from FormHelper to normalize APIs that are commonly used.
|
void |
renderOtherForm(Form form,
String path,
String selectors,
org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
Wrapped method to create a interface from FormHelper to normalize APIs that are commonly used.
|
static final String EXTENSION
static final String DEFAULT_FORM_SELECTOR
static final String FORM_NAME_INPUT
static final String FORM_RESOURCE_INPUT
static final int SERVICE_RANKING_FORWARD_AS_GET
static final int SERVICE_RANKING_POST_REDIRECT_GET
static final int SERVICE_RANKING_POST_REDIRECT_WITH_COOKIES_GET
static final int SERVICE_RANKING_BASE
Form getForm(String formName, org.apache.sling.api.SlingHttpServletRequest request)
formName - request - Form getForm(String formName, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
formName - request - response - String getFormInputsHTML(Form form, String... keys)
form - keys - IOExceptionString getFormSelector(org.apache.sling.api.SlingHttpServletRequest slingRequest)
slingRequest - String getAction(org.apache.sling.api.resource.Resource resource)
Appends ".post.html" to the resource's path.
resource - String getAction(org.apache.sling.api.resource.Resource resource, String formSelector)
Appends ".html/
resource - formSelector - String getAction(com.day.cq.wcm.api.Page page)
Appends ".html/
page - String getAction(com.day.cq.wcm.api.Page page, String formSelector)
Appends ".html/
page - formSelector - String getAction(String path)
Appends ".html/
path - String getAction(String path, String formSelector)
Appends ".html/
path - formSelector - void renderForm(Form form, String path, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException, javax.servlet.ServletException
- Wraps implementing FormHelper's `render(..)` method (sendRedirect or forwardAsGet) in the implementing FormHelper
form - path - request - response - IOExceptionjavax.servlet.ServletExceptionJSONExceptionvoid renderForm(Form form, com.day.cq.wcm.api.Page page, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException, javax.servlet.ServletException
- Wraps implementing FormHelper's `render(..)` method (sendRedirect or forwardAsGet) in the implementing FormHelper
form - page - request - response - IOExceptionjavax.servlet.ServletExceptionJSONExceptionvoid renderForm(Form form, org.apache.sling.api.resource.Resource resource, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException, javax.servlet.ServletException
- Wraps implementing `.renderForm(..)` method (sendRedirect or forwardAsGet) in the implementing FormHelper
form - resource - request - response - IOExceptionjavax.servlet.ServletExceptionJSONExceptionvoid renderOtherForm(Form form, String path, String selectors, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException, javax.servlet.ServletException
- Wraps implementing FormHelper's `render(..)` method (sendRedirect or forwardAsGet) in the implementing FormHelper
form - path - request - response - IOExceptionjavax.servlet.ServletExceptionJSONExceptionvoid renderOtherForm(Form form, com.day.cq.wcm.api.Page page, String selectors, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException, javax.servlet.ServletException
- Wraps implementing FormHelper's `render(..)` method (sendRedirect or forwardAsGet) in the implementing FormHelper
form - page - request - response - IOExceptionjavax.servlet.ServletExceptionJSONExceptionvoid renderOtherForm(Form form, org.apache.sling.api.resource.Resource resource, String selectors, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws IOException, javax.servlet.ServletException
- Wraps implementing FormHelper's `render(..)` method (sendRedirect or forwardAsGet) in the implementing FormHelper
form - resource - request - response - IOExceptionjavax.servlet.ServletExceptionCopyright © 2013–2020 Adobe. All rights reserved.