Java Reference
In-Depth Information
public void setUwrBusinessDelegate(
UnderWritingBusinessDelegate uwrBusinessDelegate) {
this.uwrBusinessDelegate = uwrBusinessDelegate;
protected ModelAndView onSubmit(Object formbean) throws Exception {
PolicyFormBean policyBean = (PolicyFormBean)formbean;
return new ModelAndView(this.getSuccessView(),"policydetails",formbean);
To use the SimpleFormController , you have to set a few configuration parameters. The
first property is the commandName property. This name is used as the key for the form bean
object set in the model. The next property you need to consider is successView . This spec-
ifies a logical view name just like the property formView . This view will be used to render a
response in case of a successful form submission. Listing 3-28 shows the configuration
Note that the command class/form bean has also been configured in
insurance-servlet.xml . Hence, you don't need to register the form bean in the
constructor of the page controller.
Listing 3-28. insurance-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
<bean name="/"
class="" >
<property name="uwrBusinessDelegate"
ref="underwritingBusinessDelegate" />
Search WWH ::

Custom Search