Class ArrayDesignFormController

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

    public class ArrayDesignFormController
    extends BaseFormController
    Controller for editing basic information about array designs.
    Author:
    keshav
    • Field Summary

      • Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandController

        DEFAULT_COMMAND_NAME
      • Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator

        METHOD_GET, METHOD_HEAD, METHOD_POST
      • Fields inherited from class org.springframework.context.support.ApplicationObjectSupport

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected Object formBackingObject​(javax.servlet.http.HttpServletRequest request)
      Case = GET: Step 1 - return instance of command class (from database).
      protected org.springframework.web.servlet.ModelAndView getCancelView​(javax.servlet.http.HttpServletRequest request)
      Override this to control which cancelView is used.
      org.springframework.web.servlet.ModelAndView onSubmit​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, org.springframework.validation.BindException errors)  
      org.springframework.web.servlet.ModelAndView processFormSubmission​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, org.springframework.validation.BindException errors)
      Default behavior for FormControllers - redirect to the successView when the cancel button has been pressed.
      protected Map<String,​List<?>> referenceData​(javax.servlet.http.HttpServletRequest request)  
      void setArrayDesignService​(ArrayDesignService arrayDesignService)  
      • Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController

        doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, isFormChangeRequest, onFormChange, onFormChange, onSubmit, onSubmit, referenceData, setFormView, setSuccessView, showForm, showForm, suppressValidation
      • Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController

        currentFormObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, handleInvalidSubmit, handleRequestInternal, isBindOnNewForm, isFormSubmission, isSessionForm, onBindOnNewForm, onBindOnNewForm, setBindOnNewForm, setSessionForm, showForm, showForm, showNewForm
      • Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController

        bindAndValidate, checkCommand, createBinder, createCommand, getBindingErrorProcessor, getCommandClass, getCommandName, getMessageCodesResolver, getPropertyEditorRegistrars, getValidator, getValidators, getWebBindingInitializer, initApplicationContext, initBinder, isValidateOnBinding, onBind, onBind, onBindAndValidate, prepareBinder, setBindingErrorProcessor, setCommandClass, setCommandName, setMessageCodesResolver, setPropertyEditorRegistrar, setPropertyEditorRegistrars, setValidateOnBinding, setValidator, setValidators, setWebBindingInitializer, suppressBinding, suppressValidation, suppressValidation, useDirectFieldAccess
      • Methods inherited from class org.springframework.web.servlet.mvc.AbstractController

        handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
      • Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator

        applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setAlwaysMustRevalidate, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
      • Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport

        getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
      • Methods inherited from class org.springframework.context.support.ApplicationObjectSupport

        getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
    • Constructor Detail

      • ArrayDesignFormController

        public ArrayDesignFormController()
    • Method Detail

      • onSubmit

        public org.springframework.web.servlet.ModelAndView onSubmit​(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     Object command,
                                                                     org.springframework.validation.BindException errors)
                                                              throws Exception
        Overrides:
        onSubmit in class org.springframework.web.servlet.mvc.SimpleFormController
        Throws:
        Exception
      • processFormSubmission

        public org.springframework.web.servlet.ModelAndView processFormSubmission​(javax.servlet.http.HttpServletRequest request,
                                                                                  javax.servlet.http.HttpServletResponse response,
                                                                                  Object command,
                                                                                  org.springframework.validation.BindException errors)
                                                                           throws Exception
        Description copied from class: BaseFormController
        Default behavior for FormControllers - redirect to the successView when the cancel button has been pressed.
        Overrides:
        processFormSubmission in class BaseFormController
        Throws:
        Exception
      • setArrayDesignService

        public void setArrayDesignService​(ArrayDesignService arrayDesignService)
      • formBackingObject

        protected Object formBackingObject​(javax.servlet.http.HttpServletRequest request)
        Case = GET: Step 1 - return instance of command class (from database). This is not called in the POST case because the sessionForm is set to 'true' in the constructor. This means the command object was already bound to the session in the GET case.
        Overrides:
        formBackingObject in class org.springframework.web.servlet.mvc.AbstractFormController
        Parameters:
        request - http request
        Returns:
        Object
      • getCancelView

        protected org.springframework.web.servlet.ModelAndView getCancelView​(javax.servlet.http.HttpServletRequest request)
        Description copied from class: BaseFormController
        Override this to control which cancelView is used. The default behavior is to go to the success view if there is no cancel view defined; otherwise, get the cancel view.
        Overrides:
        getCancelView in class BaseFormController
        Parameters:
        request - can be used to control which cancel view to use. (This is not used in the default implementation)
        Returns:
        the view to use.
      • referenceData

        protected Map<String,​List<?>> referenceData​(javax.servlet.http.HttpServletRequest request)
        Overrides:
        referenceData in class org.springframework.web.servlet.mvc.SimpleFormController