org.riotfamily.components.editor
Class AbstractFrontOfficeFormController

java.lang.Object
  extended by org.riotfamily.forms.controller.AbstractFormController
      extended by org.riotfamily.forms.controller.AjaxFormController
          extended by org.riotfamily.forms.factory.RepositoryFormController
              extended by org.riotfamily.components.editor.AbstractFrontOfficeFormController
All Implemented Interfaces:
MessageSourceAware, Controller
Direct Known Subclasses:
ContentFormController

public abstract class AbstractFrontOfficeFormController
extends RepositoryFormController

Author:
Felix Gnass [fgnass at neteye dot de]

Field Summary
 
Fields inherited from class org.riotfamily.forms.factory.RepositoryFormController
DEFAULT_FORM_ID_PARAM
 
Fields inherited from class org.riotfamily.forms.controller.AbstractFormController
BUTTON_CONTAINER_ID, FORM_SUBMISSION_HANDLER, log
 
Constructor Summary
AbstractFrontOfficeFormController(FormRepository formRepository, PlatformTransactionManager transactionManager)
           
 
Method Summary
protected  String getFormId(HttpServletRequest request)
          Returns the id of the form to be used.
protected  String getSessionAttribute(HttpServletRequest request)
          Returns the name of the attribute under which the Form is stored in the HTTP session.
 ModelAndView handleFormSubmission(Form form, HttpServletRequest request, HttpServletResponse response)
           
protected  void handleFormSubmissionInternal(Form form, HttpServletRequest request, HttpServletResponse response)
           
protected  void initForm(Form form, HttpServletRequest request)
          Subclasses may overwrite this method to initialize forms after they have been populated.
protected abstract  void reattach(Object object, HttpServletRequest request)
           
 void setSuccessViewName(String successViewName)
           
 void setViewName(String viewName)
           
protected  ModelAndView showForm(Form form, HttpServletRequest request, HttpServletResponse response)
           
protected abstract  void update(Object object, HttpServletRequest request)
           
 
Methods inherited from class org.riotfamily.forms.factory.RepositoryFormController
createForm, getFormIdParam, getFormRepository, setFormIdParam
 
Methods inherited from class org.riotfamily.forms.controller.AjaxFormController
handleFormRequest, isEventRequest, isInitialRequest, processAjaxRequest, processEventRequest, renderForm, setMessageSource
 
Methods inherited from class org.riotfamily.forms.controller.AbstractFormController
createAndInitForm, createModelAndView, getForm, getFormBackingObject, getWriter, handleContentRequest, handleRequest, initController, isContentRequest, isExclusiveRequest, populateForm, processForm, removeFormFromSession, setFormContextFactory, setProcessNewForms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFrontOfficeFormController

public AbstractFrontOfficeFormController(FormRepository formRepository,
                                         PlatformTransactionManager transactionManager)
Method Detail

setViewName

public void setViewName(String viewName)

setSuccessViewName

public void setSuccessViewName(String successViewName)

getFormId

protected String getFormId(HttpServletRequest request)
Description copied from class: RepositoryFormController
Returns the id of the form to be used. The default implementation returns the value of the formIdParam request parameter.

Overrides:
getFormId in class RepositoryFormController

getSessionAttribute

protected String getSessionAttribute(HttpServletRequest request)
Description copied from class: RepositoryFormController
Returns the name of the attribute under which the Form is stored in the HTTP session. This implementation returns the formId with the controller's class name as prefix.

Overrides:
getSessionAttribute in class RepositoryFormController

initForm

protected void initForm(Form form,
                        HttpServletRequest request)
Description copied from class: AbstractFormController
Subclasses may overwrite this method to initialize forms after they have been populated. The default implementation does nothing.

Overrides:
initForm in class AjaxFormController

showForm

protected ModelAndView showForm(Form form,
                                HttpServletRequest request,
                                HttpServletResponse response)
                         throws Exception
Overrides:
showForm in class AbstractFormController
Throws:
Exception

handleFormSubmission

public final ModelAndView handleFormSubmission(Form form,
                                               HttpServletRequest request,
                                               HttpServletResponse response)
                                        throws Exception
Specified by:
handleFormSubmission in class AbstractFormController
Throws:
Exception

handleFormSubmissionInternal

protected void handleFormSubmissionInternal(Form form,
                                            HttpServletRequest request,
                                            HttpServletResponse response)
                                     throws Exception
Throws:
Exception

reattach

protected abstract void reattach(Object object,
                                 HttpServletRequest request)

update

protected abstract void update(Object object,
                               HttpServletRequest request)