Announcement Announcement Module
Collapse
No announcement yet.
Why formBackingObject() method is being called when submitting form? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why formBackingObject() method is being called when submitting form?

    Hi,
    When using SimpleFormController, the formBackingObject() method is called to prepare the Command object which contains the data to be displayed in the form.
    But once i modified the values in the form and submit it, i noticed that before invoking the doSubmit() method , the formBackingObject() method is again called and then current values in the form will be populated in the Command Object .

    Can any one tell me the purpose of invoking the formBackingObject() method when the form is submitted.

    Thanks,
    K. Siva Prasad Reddy.

  • #2
    There is an object needed to bind to, the only way to get an object is by invoking the formBackingObject method. If you don't want this, store the objct in the session (sessionForm=true) and then it will only be called when rendering, next requests will retrieve it from the session.

    Comment

    Working...
    X