Announcement Announcement Module
No announcement yet.
how to use the formBackingObject() method in edit operation Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to use the formBackingObject() method in edit operation

    Hi all,

    I'm doing the edit page now.

    My controller have two command objects, I'm deciding the command class using

    the formBackingObject method. we are keeping the command in the session, so I'm retrieving the command from the session and sent back to the jsp page. I', getting the data in the form fields.

    after coming to the edit page if the user presses the cancel button it goes to formBackingObject again and retrieve the data from the session, again it is doing the same process so i can't cancel the form submission,

    can anyone suggest me how to resolve the issue

  • #2
    Newbee here. Not sure how the session based system are working i detail, but got a simple idea if nothing else works i think.
    What if u did not submit the form..? Just add a cancel button

    <input type="button" name="cancel" value="Cancel" onclick="window.location='myCancelPage.htm';" />
    Well if you don't and the "right" way to do it i mean



    • #3
      in the formbackingobject you need to check if "cancel" button was hit. If so then remove the command object from the session and refresh it again from the backend. thats what I do..its much cleaner to do it that way...then redirect to the page as it was a new screen..