Announcement Announcement Module
Collapse
No announcement yet.
isFormChangeRequest without validation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • isFormChangeRequest without validation

    Maybe I misunderstand something, but when I use only onBindAndValidate(), I mean there are no validators, but there are validation errors, then isFormChangeRequest() method won't get called.

    BaseCommmandController's bindAndValidate() method:
    Code:
    if (this.validators != null && isValidateOnBinding() && !suppressValidation(request)) {...}
    onBindAndValidate(...);
    so, when there are no validators, then suppressValidation (which calls isFormChangeRequest() in SimpleFormController) doesn't get called.


    SimpleFormController's processFormSubmission() method:
    Code:
    if (errors.hasErrors() || isFormChangeRequest(request)) ...
    so if I use onBindAndValidate() for validation and there are validation errors, then isFormChangeRequest() doesn't get called again.

    Is it the normal way, or am I missing something?
    Won't it be a better way to check isFormChangeRequest first, and if it returns false, then make the validation?
Working...
X