The form loads with all the appropriate values but when I click on the submit button the formBackingObject gets invoked again and the onSubmit doesn't get invoked???
Here's my bean def:
<bean id="tranDefGroupDetailController" class="com.x.web.controllers.TranDefGroupDetailCon troller">
<property name="commandName">
<value>tranDefGroup</value>
</property>
<property name="formView">
<value>tranDefGroupDetail</value>
</property>
<property name="successView">
<value>tranDefGroupList</value>
</property>
</bean>
Here's code snippet from my controller which extends SimpleFormController
protected Object formBackingObject(HttpServletRequest request) throws Exception
{
long id = RequestUtils.getRequiredLongParameter(request, "tranDefGroupId");
TranDefGroup tranDefGroup = ConfigurationService.getTranDefGroup(new Long(id));
return tranDefGroup;
}
protected ModelAndView onSubmit(Object command) throws Exception
{
TranDefGroup tranDefGroup = (TranDefGroup)command;
boolean result = ConfigurationService.save(tranDefGroup);
if(result)
return new ModelAndView(getSuccessView());
else
return new ModelAndView(getFormView());
}


Reply With Quote