org.appfuse.web
Class UserFormController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.springframework.web.servlet.mvc.BaseCommandController
                      extended by org.springframework.web.servlet.mvc.AbstractFormController
                          extended by org.springframework.web.servlet.mvc.SimpleFormController
                              extended by org.appfuse.web.UserFormController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

@Controller
@RequestMapping(value="/userform.*")
public class UserFormController
extends org.springframework.web.servlet.mvc.SimpleFormController


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
 
Constructor Summary
UserFormController()
           
 
Method Summary
protected  java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
           
 java.lang.String getText(java.lang.String msgKey)
          Convenience method for getting a i18n key's value.
 java.lang.String getText(java.lang.String msgKey, java.lang.Object[] args)
          Convenience method for getting a i18n key's value with arguments.
 java.lang.String getText(java.lang.String msgKey, java.lang.String arg)
          Convenient method for getting a i18n key's value with a single string argument.
protected  void initBinder(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.ServletRequestDataBinder binder)
          Set up a custom property editor for converting Longs
 org.springframework.web.servlet.ModelAndView onSubmit(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object command, org.springframework.validation.BindException errors)
           
 org.springframework.web.servlet.ModelAndView processFormSubmission(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object command, org.springframework.validation.BindException errors)
           
 void setFormValidator(org.springframework.validation.Validator validator)
           
 
Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController
doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, isFormChangeRequest, onFormChange, onFormChange, onSubmit, onSubmit, referenceData, 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, 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, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserFormController

public UserFormController()
Method Detail

setFormValidator

public void setFormValidator(org.springframework.validation.Validator validator)

processFormSubmission

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

initBinder

protected void initBinder(javax.servlet.http.HttpServletRequest request,
                          org.springframework.web.bind.ServletRequestDataBinder binder)
Set up a custom property editor for converting Longs

Overrides:
initBinder in class org.springframework.web.servlet.mvc.BaseCommandController

onSubmit

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

formBackingObject

protected java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
                                      throws javax.servlet.ServletException
Overrides:
formBackingObject in class org.springframework.web.servlet.mvc.AbstractFormController
Throws:
javax.servlet.ServletException

getText

public java.lang.String getText(java.lang.String msgKey)
Convenience method for getting a i18n key's value. Calling getMessageSourceAccessor() is used because the RequestContext variable is not set in unit tests b/c there's no DispatchServlet Request.

Parameters:
msgKey - the i18n key to lookup
Returns:
the message for the key

getText

public java.lang.String getText(java.lang.String msgKey,
                                java.lang.String arg)
Convenient method for getting a i18n key's value with a single string argument.

Parameters:
msgKey - the i18n key to lookup
arg - arguments to substitute into key's value
Returns:
the message for the key

getText

public java.lang.String getText(java.lang.String msgKey,
                                java.lang.Object[] args)
Convenience method for getting a i18n key's value with arguments.

Parameters:
msgKey - the i18n key to lookup
args - arguments to substitute into key's value
Returns:
the message for the key


Copyright © 2009. All Rights Reserved.