Results 1 to 3 of 3

Thread: Form editing with SimpleFormController

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Location
    Hyderabad
    Posts
    27

    Default Form editing with SimpleFormController

    Hi,
    My requirement is to show list of employee details as a result of search operation and i have to edit the employee details by clicking on employee id.

    Now the problem is when i am using SimpleFormController i am preparing the Employee bean to be edited in formBackingObject() method by taking the request Parameter empId. First time when i clicked on the edit link its getting the Employee details and showing in the form. But when i change the values and submit it, it is again calling the formBackingObject() method which is not to be done in this scenario.

    I am newbie to Spring, i think the above said approach is not correct. Can any body let me know how to handle this scenario.

    Thanks,
    K. Siva Prasad Reddy.

  2. #2
    Join Date
    Oct 2008
    Location
    Delhi, India
    Posts
    163

    Default

    Set the property sessionForm of your controller to true. This will prevent a second call to formBackingObject() on a submit.

  3. #3
    Join Date
    Sep 2008
    Location
    Hyderabad
    Posts
    27

    Thumbs up

    Thanks for your reply.
    It works fine.
    Thanks,
    K. Siva Prasad Reddy

Tags for this Thread

Posting Permissions

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