Interface MultiStepFormComponent
-
@ProviderType public interface MultiStepFormComponent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FormgetForm(org.apache.sling.api.SlingHttpServletRequest request, String step)Get the data from the HTTP Request and move into the Map-based Form abstractionvoidonFailure(Form form, String step, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)Handle unsuccessful form submission.voidonSuccess(Form form, String step, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)Handle successful form submission.booleansave(Form form, String step)Save the data to the underlying data store; implementation specific.Formvalidate(Form form, String step)Validate the provided form data.
-
-
-
Method Detail
-
getForm
Form getForm(org.apache.sling.api.SlingHttpServletRequest request, String step)
Get the data from the HTTP Request and move into the Map-based Form abstraction- Parameters:
request-- Returns:
-
validate
Form validate(Form form, String step)
Validate the provided form data. Create any Error records on the form itself.- Parameters:
form-- Returns:
-
save
boolean save(Form form, String step)
Save the data to the underlying data store; implementation specific. This could be CRX or external data store.- Parameters:
form-- Returns:
-
onSuccess
void onSuccess(Form form, String step, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws Exception
Handle successful form submission. Typically includes a 302 redirect to a Success page.- Parameters:
form-request-response-- Throws:
Exception
-
onFailure
void onFailure(Form form, String step, org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response) throws Exception
Handle unsuccessful form submission. Typically includes a 302 redirect back to self.- Parameters:
form-request-response-- Throws:
Exception
-
-