Announcement Announcement Module
No announcement yet.
onSubmit Method Bypassed Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • onSubmit Method Bypassed

    Hi, an incomprehensible problem occur with a SimpleFormController object : the onSubmit method is bypassed when I submit my form.
    • my controller public class BugReporterController extends SimpleFormController contains :
    protected Object formBackingObject(HttpServletRequest request) throws Exception

    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response,
    Object command, BindException errors) throws Exception

    • Xml configuration file
    <prop key="/bug/report.html">Bug.ReporterController</prop>

    <bean id="Bug.ReporterController" class="com.omegames.kilometres.bugReporter.BugRepo rterController" autowire="byName">
    <property name="sessionForm" value="true"/>
    <property name="commandName" value="bug"/>
    <property name="commandClass" value="com.omegames.kilometres.domain.Bug"/>
    <property name="formView" value="bug/report"/>
    <property name="validator" ref="Bug.Validator"/>
    <property name="successView" value="bug/succes"/>
    Last edited by agrosjea; Jan 6th, 2009, 09:06 AM.

  • #2
    Usually the reason in these cases are that you have one or more bind errors. Try to log the errors in the controller or show the errors in the JSP page.


    • #3
      Actually I found the problem, A spring taglib was missing, so binds were not working and nothing was sent through POST when the form was submitted.

      Thx a lot .
      Last edited by agrosjea; Jan 6th, 2009, 01:14 PM.