info.magnolia.module.form.templates.components.multistep
Class SubStepFormEngine

java.lang.Object
  extended by info.magnolia.module.form.engine.FormEngine
      extended by info.magnolia.module.form.templates.components.AbstractFormEngine
          extended by info.magnolia.module.form.templates.components.multistep.SubStepFormEngine

public class SubStepFormEngine
extends AbstractFormEngine

FormEngine implementation for step 2+ of multi step forms. Finds the next step by looking for the first subsequent sibling that contains a paragraph of type FormStepParagraph.


Field Summary
 
Fields inherited from class info.magnolia.module.form.engine.FormEngine
context, redirectWithParams
 
Constructor Summary
SubStepFormEngine(javax.jcr.Node configurationNode, FormParagraph configurationParagraph, javax.jcr.Node startPage, info.magnolia.rendering.context.RenderingContext context)
           
 
Method Summary
protected  String getNextPage()
          Returns the UUID of the page to redirect to when validation succeeds or null to proceed to executing processors.
protected  View handleNoSuchFormState(String formStateToken)
          Called when the form was to be rendered for a supplied form token but there is no state in the session.
protected  View handleNoSuchFormStateOnSubmit(String formStateToken)
          Called when a submission occurs with a form state token but there is no formState in session.
protected  View handleTokenMissing()
          Called when the form is to be rendered and there's no token provided.
 void setStartPage(javax.jcr.Node startPage)
           
 
Methods inherited from class info.magnolia.module.form.templates.components.AbstractFormEngine
executeProcessors, getConfigurationNode, getConfigurationParagraph, getFormDataBinder, getFormView, getProcessorFailedView, getSuccessView
 
Methods inherited from class info.magnolia.module.form.engine.FormEngine
createAndSetFormState, destroyFormState, getFormState, getFormState, getFormStateToken, getPreviousPage, getValidationFailedView, getValidationSuccessfulView, handleRequest, isBackButton, isFormSubmission, isRedirectWithParams, setFormState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubStepFormEngine

public SubStepFormEngine(javax.jcr.Node configurationNode,
                         FormParagraph configurationParagraph,
                         javax.jcr.Node startPage,
                         info.magnolia.rendering.context.RenderingContext context)
Method Detail

setStartPage

public void setStartPage(javax.jcr.Node startPage)

handleTokenMissing

protected View handleTokenMissing()
                           throws javax.jcr.RepositoryException
Description copied from class: FormEngine
Called when the form is to be rendered and there's no token provided. The default behaviour is to return a view that renders the form without creating a new form state.

Overrides:
handleTokenMissing in class FormEngine
Throws:
javax.jcr.RepositoryException

handleNoSuchFormState

protected View handleNoSuchFormState(String formStateToken)
                              throws javax.jcr.RepositoryException
Description copied from class: FormEngine
Called when the form was to be rendered for a supplied form token but there is no state in the session. This typically happens when the user navigates back after having completed the form or if the user returns later via a bookmark or via browser history.

Overrides:
handleNoSuchFormState in class AbstractFormEngine
Throws:
javax.jcr.RepositoryException

handleNoSuchFormStateOnSubmit

protected View handleNoSuchFormStateOnSubmit(String formStateToken)
                                      throws javax.jcr.RepositoryException
Description copied from class: FormEngine
Called when a submission occurs with a form state token but there is no formState in session. This typically happens when the user has waited so long to complete the form that the session timed out.

Overrides:
handleNoSuchFormStateOnSubmit in class FormEngine
Throws:
javax.jcr.RepositoryException

getNextPage

protected String getNextPage()
                      throws javax.jcr.RepositoryException
Description copied from class: FormEngine
Returns the UUID of the page to redirect to when validation succeeds or null to proceed to executing processors.

Overrides:
getNextPage in class FormEngine
Throws:
javax.jcr.RepositoryException


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.