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 org.springframework.web.servlet.mvc.SimpleFormController
    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)  
      protected void initBinder​(org.springframework.web.bind.WebDataBinder binder)
      Set up a custom property editor for converting form inputs to real objects.
      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)  
      protected Map<String,​List<?>> referenceData​(javax.servlet.http.HttpServletRequest request)  
      • 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
        Overrides:
        processFormSubmission in class org.springframework.web.servlet.mvc.SimpleFormController
        Throws:
        Exception
      • 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)
      • referenceData

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

        @InitBinder
        protected void initBinder​(org.springframework.web.bind.WebDataBinder binder)
        Set up a custom property editor for converting form inputs to real objects. Override this to add additional custom editors (call super.initBinder() in your implementation)