Class ComponentController

    • 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
      void addEditView​(String jspLocation, String viewName)
      Adds an edit view to the registered edit views of this controller.
      void addEditView​(String jspLocation, String viewName, Component component)  
      protected void createResourceBaseNames​(Object command)
      Callback to add resource base names.
      Object formBackingObject​(javax.servlet.http.HttpServletRequest request)
      Retrieve a form backing object for the current form from the given request.
      String getBundleDefinitionId()
      Return the configured bundleId for this controller
      protected Component getComponent()
      Return the component to which this controller belongs.
      DelegatedController getParentController()  
      protected org.springframework.web.servlet.ModelAndView onSubmit​(Object command)
      Marked final to prevent developers from trying to overrule the method which wouldn't work since this is a delegated controller not running inside the spring application context.
      protected org.springframework.web.servlet.ModelAndView onSubmit​(Object command, org.springframework.validation.BindException errors)
      Marked final to prevent developers from trying to overrule the method which wouldn't work since this is a delegated controller not running inside the spring application context.
      protected org.springframework.web.servlet.ModelAndView onSubmit​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, org.springframework.validation.BindException errors)
      Marked final to prevent developers from trying to overrule the method which wouldn't work since this is a delegated controller not running inside the spring application context.
      protected Map<String,​Object> referenceData​(javax.servlet.http.HttpServletRequest request)  
      void setBundleDefinitionId​(String bundleDefinitionId)
      Set the bundleId for this controller
      void setComponent​(Component component)
      Sets the component to which this controller belongs, called by the component manager when the controller is created.
      void setDelegatedControllers​(Object formbackingObject, javax.servlet.http.HttpServletRequest request)
      Called by extension consumer in formBackingObject(...) method of controller
      void setParentController​(DelegatedController parentController)  
      org.springframework.web.servlet.ModelAndView showForm​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.validation.BindException errors, Map controlModel)
      Returns the Model and view to be used when rendering the form backing object that is returned by this controller
      • Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController

        doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, isFormChangeRequest, onFormChange, onFormChange, processFormSubmission, setFormView, setSuccessView, 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, isValidateOnBinding, onBind, 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

      • ComponentController

        public ComponentController()
    • Method Detail

      • getBundleDefinitionId

        public String getBundleDefinitionId()
        Return the configured bundleId for this controller
        Returns:
        the bundleId
      • setBundleDefinitionId

        public void setBundleDefinitionId​(String bundleDefinitionId)
        Set the bundleId for this controller
        Parameters:
        bundleDefinitionId -
      • onSubmit

        protected final 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
        Marked final to prevent developers from trying to overrule the method which wouldn't work since this is a delegated controller not running inside the spring application context.
        Overrides:
        onSubmit in class org.springframework.web.servlet.mvc.SimpleFormController
        Throws:
        Exception
      • onSubmit

        protected final org.springframework.web.servlet.ModelAndView onSubmit​(Object command)
                                                                       throws Exception
        Marked final to prevent developers from trying to overrule the method which wouldn't work since this is a delegated controller not running inside the spring application context.
        Overrides:
        onSubmit in class org.springframework.web.servlet.mvc.SimpleFormController
        Throws:
        Exception
      • onSubmit

        protected final org.springframework.web.servlet.ModelAndView onSubmit​(Object command,
                                                                              org.springframework.validation.BindException errors)
                                                                       throws Exception
        Marked final to prevent developers from trying to overrule the method which wouldn't work since this is a delegated controller not running inside the spring application context.
        Overrides:
        onSubmit in class org.springframework.web.servlet.mvc.SimpleFormController
        Throws:
        Exception
      • showForm

        public org.springframework.web.servlet.ModelAndView showForm​(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     org.springframework.validation.BindException errors,
                                                                     Map controlModel)
                                                              throws Exception
        Returns the Model and view to be used when rendering the form backing object that is returned by this controller
        Specified by:
        showForm in interface DelegatedController
        Overrides:
        showForm in class org.springframework.web.servlet.mvc.SimpleFormController
        Parameters:
        request - current servlet request
        response - current servlet response
        errors - Errors instance without errors (subclass can add errors if it wants to)
        controlModel - The model
        Returns:
        The model and view to be used when rendering the form backing object
        Throws:
        Exception - in case of errors
      • referenceData

        protected final Map<String,​Object> referenceData​(javax.servlet.http.HttpServletRequest request)
                                                        throws Exception
        Overrides:
        referenceData in class org.springframework.web.servlet.mvc.SimpleFormController
        Throws:
        Exception
      • addEditView

        public void addEditView​(String jspLocation,
                                String viewName)
        Adds an edit view to the registered edit views of this controller. If an edit view is added with a viewName that already exists the existing edit view will be replaced with the new edit view
        Parameters:
        jspLocation - JSP location of the view to add
        viewName - Logical name of the view to add editViews Array of EditView object to set
      • setComponent

        public void setComponent​(Component component)
        Sets the component to which this controller belongs, called by the component manager when the controller is created.
        Specified by:
        setComponent in interface ComponentAware
        Parameters:
        component - component to set
      • getComponent

        protected Component getComponent()
        Return the component to which this controller belongs.
        Returns:
        the component to which this controller belongs
      • formBackingObject

        public Object formBackingObject​(javax.servlet.http.HttpServletRequest request)
                                 throws javax.servlet.ServletException
        Retrieve a form backing object for the current form from the given request. Override this method to return the form backing object
        Specified by:
        formBackingObject in interface DelegatedController
        Overrides:
        formBackingObject in class BaseWebmanagerController
        Parameters:
        request - current HTTP request
        Returns:
        the FormBackingObject
        Throws:
        Exception - in case of invalid state or arguments
        javax.servlet.ServletException - in case of errors
      • setParentController

        public void setParentController​(DelegatedController parentController)
      • setDelegatedControllers

        public void setDelegatedControllers​(Object formbackingObject,
                                            javax.servlet.http.HttpServletRequest request)
                                     throws javax.servlet.ServletException
        Called by extension consumer in formBackingObject(...) method of controller
        Parameters:
        formbackingObject -
        request -
        Throws:
        javax.servlet.ServletException
      • createResourceBaseNames

        protected void createResourceBaseNames​(Object command)
        Description copied from class: BaseWebmanagerController
        Callback to add resource base names. Sub classes should implement this method, call the super and invoke addResourceBaseNames to add its own resource base names to the controller.
        Specified by:
        createResourceBaseNames in class BaseWebmanagerController