Announcement Announcement Module
No announcement yet.
Previous information is lost when I submit a form Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Previous information is lost when I submit a form

    Hi all, I'm spanish, so sorry for my English.

    I have a little problem and I don't know what is the best solution, I have a form with input text, selects, textareas... etc, when I fill these fields and submit this form I go to a confirmation page. If I decide to cancel the operation in this page I come back to the previous form but all the information in the fields has dissapeared. With struts it was very easy to avoid this situation, but I don't know how to do this with spring.

    Thanks in advance,

    Juan M. Monreal

  • #2
    Show as your JSP code and FormController code please.


    • #3
      Assuming you're using a SimpleFormController or AbstractFormController, you might want to have a look at the 'sessionForm' property on these controllers.

      This keeps your command object in the session, which means that your form will be filled on your previous page.

      I hope that helps solving your problem, if not, please do as radone says



      • #4
        Thanks to you, erik and radone. The problem was in a bad use of the command object.