public class PersonFormController
extends org.springframework.web.servlet.mvc.SimpleFormController
PatientFormController
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log
Logger for this class and subclasses
|
DEFAULT_COMMAND_NAME
Constructor and Description |
---|
PersonFormController() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
formBackingObject(javax.servlet.http.HttpServletRequest request) |
static <P extends Person> |
getMiniPerson(P person,
java.lang.String name,
java.lang.String gender,
java.lang.String date,
java.lang.String age)
Add the given name, gender, and birthdate/age to the given Person
|
protected void |
initBinder(javax.servlet.http.HttpServletRequest request,
org.springframework.web.bind.ServletRequestDataBinder binder)
Allows for other Objects to be used as values in input tags.
|
protected 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) |
protected org.springframework.web.servlet.ModelAndView |
processFormSubmission(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Object obj,
org.springframework.validation.BindException errors) |
protected java.util.Map<java.lang.String,java.lang.Object> |
referenceData(javax.servlet.http.HttpServletRequest request,
java.lang.Object obj,
org.springframework.validation.Errors err) |
protected Person |
setupFormBackingObject(Person person)
Setup the person object.
|
protected java.util.Map |
setupReferenceData(java.util.Map map,
Person person)
Setup the reference map object.
|
protected org.springframework.web.servlet.ModelAndView |
showForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.validation.BindException errors)
Redirects to the patient form if the given personId points to a patient.
|
protected org.springframework.web.servlet.ModelAndView |
showForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.validation.BindException errors,
java.util.Map controlModel)
Redirects to the patient form if the given personId points to a patient.
|
protected void |
updatePersonAddresses(javax.servlet.http.HttpServletRequest request,
Person person)
Updates person addresses based on request parameters
|
protected void |
updatePersonAttributes(javax.servlet.http.HttpServletRequest request,
org.springframework.validation.BindException errors,
Person person)
Updates person attributes based on request parameters
|
protected void |
updatePersonNames(javax.servlet.http.HttpServletRequest request,
Person person)
Updates person names based on request parameters
|
doSubmitAction, getFormView, getSuccessView, isFormChangeRequest, isFormChangeRequest, onFormChange, onFormChange, onSubmit, onSubmit, referenceData, setFormView, setSuccessView, suppressValidation
currentFormObject, getCommand, getErrorsForNewForm, getFormSessionAttributeName, getFormSessionAttributeName, handleInvalidSubmit, handleRequestInternal, isBindOnNewForm, isFormSubmission, isSessionForm, onBindOnNewForm, onBindOnNewForm, setBindOnNewForm, setSessionForm, showForm, showForm, showNewForm
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
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
protected static final org.apache.commons.logging.Log log
protected void initBinder(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.ServletRequestDataBinder binder) throws java.lang.Exception
initBinder
in class org.springframework.web.servlet.mvc.BaseCommandController
java.lang.Exception
BaseCommandController.initBinder(javax.servlet.http.HttpServletRequest,
org.springframework.web.bind.ServletRequestDataBinder)
protected java.lang.Object formBackingObject(javax.servlet.http.HttpServletRequest request) throws java.lang.Exception
formBackingObject
in class org.springframework.web.servlet.mvc.AbstractFormController
java.lang.Exception
protected org.springframework.web.servlet.ModelAndView showForm(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.validation.BindException errors) throws java.lang.Exception
showForm
in class org.springframework.web.servlet.mvc.SimpleFormController
java.lang.Exception
SimpleFormController.showForm(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, org.springframework.validation.BindException)
protected org.springframework.web.servlet.ModelAndView showForm(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.validation.BindException errors, java.util.Map controlModel) throws java.lang.Exception
showForm
in class org.springframework.web.servlet.mvc.SimpleFormController
java.lang.Exception
SimpleFormController.showForm(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, org.springframework.validation.BindException,
java.util.Map)
protected org.springframework.web.servlet.ModelAndView processFormSubmission(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Object obj, org.springframework.validation.BindException errors) throws java.lang.Exception
processFormSubmission
in class org.springframework.web.servlet.mvc.SimpleFormController
java.lang.Exception
AbstractFormController.processFormSubmission(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, java.lang.Object,
org.springframework.validation.BindException)
protected 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
onSubmit
in class org.springframework.web.servlet.mvc.SimpleFormController
java.lang.Exception
protected java.util.Map<java.lang.String,java.lang.Object> referenceData(javax.servlet.http.HttpServletRequest request, java.lang.Object obj, org.springframework.validation.Errors err) throws java.lang.Exception
referenceData
in class org.springframework.web.servlet.mvc.SimpleFormController
java.lang.Exception
protected void updatePersonAttributes(javax.servlet.http.HttpServletRequest request, org.springframework.validation.BindException errors, Person person)
request
- errors
- person
- protected void updatePersonNames(javax.servlet.http.HttpServletRequest request, Person person)
request
- person
- protected void updatePersonAddresses(javax.servlet.http.HttpServletRequest request, Person person) throws java.text.ParseException
request
- person
- java.text.ParseException
protected Person setupFormBackingObject(Person person)
person
- protected java.util.Map setupReferenceData(java.util.Map map, Person person) throws java.lang.Exception
person
- java.lang.Exception
public static <P extends Person> void getMiniPerson(P person, java.lang.String name, java.lang.String gender, java.lang.String date, java.lang.String age)
P
- Should be a Patient or User objectperson
- name
- gender
- date
- birthdateage
- Copyright © 2020 OpenMRS Inc.. All Rights Reserved.