MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

Spring Framework

Spring Projects

Spring Project 1

AbstractFormController in String MVC
Previous Home Next

This controller provide the facility to auto-populates a form bean from the request. this form controller using new bean instance per request and its also provide the same bean when the sessionForm property has been sent to true.

This controller class is the base class of SimpleFormController and AbstractWizardFromController. both form-input views and after-submission view provided this controller class through the programmatically which are configure in spring applicationContext file. Its subclass also override the showForm() method for view and processFormSubmission to handle submit request .

Syntax:

public abstract class AbstractFormController
extends BaseCommandController

This controller class also provide following type of method:

setBindOnNewForm:

public final void setBindOnForm(boolean bindOnNewForm)

isBindOnNewForm:

public final boolean isBindOnNewForm()

setSessionForm:

public final void setSessionForm(boolean sessionForm)

isSessionForm:

public final boolean isSessionForm()

handleRequestInternal:

protected ModelAndView handleRequestInternal(httpServletRequest
request,HttpServletResponse response)throws Exception

isFormSubmission:

protected boolean isFormSubmission(HttpServletRequest request)

getFormSessionAttributeName:

protected String getFormSessionAttributeName(HttpServletRequest
requesat)

showNewForm:

protected final ModelAndView showNewForm(HttpServletRequest
request,HttpServletResponse)throws Exception

getErrorsForNewForm:

protected final BindException getErrorsForNewForm
(HttpServletRequest request)throws Exception

onBindOnNewForm:

protected void onBindOnNewForm(HttpServletRequest request,
Object command, BindException errors)throws Exception

onBindOnNewForm:

protected void onBindOnNewForm(HttpServletRequest request,
Object command)throws Exception

getCommand:

protected final Object getCommand(httpServletRequest
request)throws Exception

formBackingObject:

protected Object formBackingObject(HttpServletRequest
request)throws Exception

currentFormObject:

protected Object currentFormObject(HttpServletRequest
request,Object sessionFormObject)throws Exception

showForm:

protected abstract ModelAndView showForm
(httpServletRequest request,HttpServletResponse response
,BindException errors)throws Exception

showForm:

protected final ModelAndView showForm
(httpServletRequest request,BindException errors,
String view Name)throws Exception

showForm:

protected abstract ModelAndView showForm
(httpServletRequest request,BindException errors,
String viewName,Map controlModel)throws Exception

referenceData:

protected Map referenceData(HttpServletRequest
request,Object command,Errors errors)Throws Exception

processFormSubmission:

protectes abstract ModelAndView processFormSubmission
(HttpServletRequest request,HttpServletResponse response
,Object command,BindException errors)throws Exception

 

handleInvalidSubmit:

protected ModelAndView handleInvalidSubmit
(HttpServletRequest request,HttpServletResponse response)
throws Exception

Example of AbstractController in Spring MVC

Previous Home Next