com.webstersmalley.chessweb.web
Class MoveFormController

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 com.webstersmalley.chessweb.web.MoveFormController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.mvc.Controller

public final class MoveFormController
extends org.springframework.web.servlet.mvc.SimpleFormController

Controller for the move form.

Author:
Matthew Smalley

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
HEADER_CACHE_CONTROL, HEADER_EXPIRES, HEADER_PRAGMA, METHOD_GET, METHOD_HEAD, METHOD_POST
 
Constructor Summary
MoveFormController()
           
 
Method Summary
protected  java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
          Creates a form backing object (a Move).
 org.springframework.web.servlet.ModelAndView onSubmit(java.lang.Object command)
          Handles the form submission.
 void setBoard(Board board)
           
 
Methods inherited from class org.springframework.web.servlet.mvc.SimpleFormController
doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, onSubmit, onSubmit, processFormSubmission, referenceData, referenceData, setFormView, setSuccessView, showForm, showForm, suppressValidation
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractFormController
getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, handleInvalidSubmit, handleRequestInternal, isBindOnNewForm, isFormSubmission, isSessionForm, setBindOnNewForm, setSessionForm, showForm, showForm, showNewForm
 
Methods inherited from class org.springframework.web.servlet.mvc.BaseCommandController
bindAndValidate, checkCommand, createBinder, createCommand, getCommandClass, getCommandName, getMessageCodesResolver, getValidator, getValidators, initApplicationContext, initBinder, isValidateOnBinding, onBind, onBind, onBindAndValidate, setCommandClass, setCommandName, setMessageCodesResolver, setValidateOnBinding, setValidator, setValidators
 
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, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired
 
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

MoveFormController

public MoveFormController()
Method Detail

onSubmit

public org.springframework.web.servlet.ModelAndView onSubmit(java.lang.Object command)
                                                      throws javax.servlet.ServletException
Handles the form submission.

Overrides:
onSubmit in class org.springframework.web.servlet.mvc.SimpleFormController
Parameters:
command - the form command
Returns:
the model/view
Throws:
javax.servlet.ServletException - if the move is invalid etc.

formBackingObject

protected java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request)
                                      throws javax.servlet.ServletException
Creates a form backing object (a Move).

Overrides:
formBackingObject in class org.springframework.web.servlet.mvc.AbstractFormController
Parameters:
request - the http request.
Returns:
the form backing object.
Throws:
javax.servlet.ServletException - if there's any problems.

setBoard

public void setBoard(Board board)
Parameters:
board - The board to set.


Copyright © 2005 Webster Smalley. All Rights Reserved.