Results 1 to 3 of 3

Thread: onSubmit Method Bypassed

  1. #1
    Join Date
    Jan 2009
    Posts
    6

    Default 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"/>
    </bean>
    Thanks
    Last edited by agrosjea; Jan 6th, 2009 at 09:06 AM.

  2. #2
    Join Date
    Apr 2005
    Location
    Finland
    Posts
    314

    Default

    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.
    if a trainstation is where the train stops, what's a workstation...

  3. #3
    Join Date
    Jan 2009
    Posts
    6

    Default

    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 at 01:14 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •