Announcement Announcement Module
Collapse
No announcement yet.
execution of onSUbmitAction method even if there are some validation errors Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • execution of onSUbmitAction method even if there are some validation errors

    I'm facing a strange behaviour.

    IN my controller, i'm doing validation as well using onBindAndValidate method. If some errors, i say errors.rejectValue("string", "error msg");

    I found that even if there are some errors, it successfully executes onSubmitAction method.

    For this controller, a i have a validator class attached to it. I'm doing validation partially on validator class as well as onBIndAndValidate methods.

    Please let me know if something wrong in my way of doing things. Also, how can i avoid executiuon of onSubmitAction method if there is some validation errors.

    Thanks so much.

  • #2
    Hi,

    I think you are doing validation by yourself , which is not a very good way, atleast when you are using the Spring MVC,
    since you are trying to do things which are anyways handled by the framework.

    could you tell what type of controller are you using (SFC,AWFC,AC,MAC)?

    Comment


    • #3
      I'm using simpleFormController (SFC).

      Comment

      Working...
      X