Package ubic.gemma.web.controller
Class BaseFormController
- java.lang.Object
- 
- All Implemented Interfaces:
- Aware,- ApplicationContextAware,- ServletContextAware,- Controller
 - Direct Known Subclasses:
- ArrayDesignFormController,- ExpressionExperimentFormController,- GeneralSearchControllerImpl
 
 @Deprecated public abstract class BaseFormController extends SimpleFormController Deprecated.SimpleFormControlleris deprecated, use annotations-based GET/POST mapping instead.Implementation of SimpleFormController that contains convenience methods for subclasses. For example, getting the current user and saving messages/errors. This class is intended to be a base class for all Form controllers.- Author:
- pavlidis (originally based on Appfuse code)
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static org.apache.commons.logging.LoglogDeprecated.- 
Fields inherited from class org.springframework.web.servlet.mvc.BaseCommandControllerDEFAULT_COMMAND_NAME
 - 
Fields inherited from class org.springframework.web.servlet.support.WebContentGeneratorMETHOD_GET, METHOD_HEAD, METHOD_POST
 - 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupportlogger
 
- 
 - 
Constructor SummaryConstructors Constructor Description BaseFormController()Deprecated.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ModelAndViewgetCancelView(javax.servlet.http.HttpServletRequest request)Deprecated.Override this to control which cancelView is used.MessageUtilgetMessageUtil()Deprecated.StringgetText(String msgKey, Locale locale)Deprecated.protected voidinitBinder(WebDataBinder binder)Deprecated.Set up a custom property editor for converting form inputs to real objects.protected ModelAndViewprocessErrors(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, BindException errors, String message)Deprecated.Convenience method to get the user object from the sessionprotected ModelAndViewprocessFormSubmission(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, BindException errors)Deprecated.Default behavior for FormControllers - redirect to the successView when the cancel button has been pressed.voidsaveMessage(javax.servlet.http.HttpServletRequest request, String msg)Deprecated.voidsaveMessage(javax.servlet.http.HttpServletRequest request, String key, Object[] parameters, String defaultMessage)Deprecated.voidsaveMessage(javax.servlet.http.HttpServletRequest request, String key, Object parameter, String defaultMessage)Deprecated.voidsaveMessage(javax.servlet.http.HttpServletRequest request, String key, String defaultMessage)Deprecated.voidsaveMessage(javax.servlet.http.HttpSession session, String msg)Deprecated.voidsetMailEngine(MailEngine mailEngine)Deprecated.voidsetMessageUtil(MessageUtil messageUtil)Deprecated.- 
Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormControllerdoSubmitAction, getFormView, getSuccessView, isFormChangeRequest, isFormChangeRequest, onFormChange, onFormChange, onSubmit, onSubmit, onSubmit, referenceData, referenceData, setFormView, setSuccessView, showForm, showForm, suppressValidation
 - 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormControllercurrentFormObject, formBackingObject, 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.BaseCommandControllerbindAndValidate, 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.AbstractControllerhandleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 - 
Methods inherited from class org.springframework.web.servlet.support.WebContentGeneratorapplyCacheSeconds, 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.WebApplicationObjectSupportgetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 - 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupportgetApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
- 
 
- 
- 
- 
Method Detail- 
getMessageUtilpublic MessageUtil getMessageUtil() Deprecated.- Returns:
- the messageUtil
 
 - 
setMessageUtilpublic void setMessageUtil(MessageUtil messageUtil) Deprecated.- Parameters:
- messageUtil- the messageUtil to set
 
 - 
saveMessagepublic void saveMessage(javax.servlet.http.HttpServletRequest request, String msg)Deprecated.
 - 
saveMessagepublic void saveMessage(javax.servlet.http.HttpServletRequest request, String key, Object parameter, String defaultMessage)Deprecated.
 - 
saveMessagepublic void saveMessage(javax.servlet.http.HttpServletRequest request, String key, Object[] parameters, String defaultMessage)Deprecated.
 - 
saveMessagepublic void saveMessage(javax.servlet.http.HttpServletRequest request, String key, String defaultMessage)Deprecated.
 - 
saveMessagepublic void saveMessage(javax.servlet.http.HttpSession session, String msg)Deprecated.
 - 
setMailEnginepublic void setMailEngine(MailEngine mailEngine) Deprecated.
 - 
getCancelViewprotected ModelAndView getCancelView(javax.servlet.http.HttpServletRequest request) Deprecated.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.- 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.
 
 - 
initBinder@InitBinder protected void initBinder(WebDataBinder binder) Deprecated.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)
 - 
processErrorsprotected ModelAndView processErrors(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, BindException errors, String message) throws Exception Deprecated.Convenience method to get the user object from the session- Parameters:
- request- the current request
- Returns:
- the user's populated object from the session
- Throws:
- Exception
 
 - 
processFormSubmissionprotected ModelAndView processFormSubmission(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object command, BindException errors) throws Exception Deprecated.Default behavior for FormControllers - redirect to the successView when the cancel button has been pressed.- Overrides:
- processFormSubmissionin class- SimpleFormController
- Throws:
- Exception
 
 
- 
 
-