0

The first page where The user should be selecting the form values[![][1]

On selecting the values and clicking SAVE/ BACK/ CONTINUE All the form values disappear,how to prevent this from happening and how to keep the values intact on clicking these buttons.

The form gets reloaded on clicking the Save order, goes back to the previous page on clicking back, and goes to the next screen on clicking continue. Business requirement is to keep all the form values intact when Save button is clicked OR when the user comes back to this page from any other page.

Please recommend a good way to achieve this. Local Storage and other things didn't suffice.

Edit on the basis of Roman C's comment: Only form gets refreshed on clicking save button. All my pages have back/continue buttons.if traversing from any other page to this page, after using the continue/ back button of that page after filling in form values, the values disappear for this page.

I m using struts 2.0 property tags to store values in value objects in my action class.

DebArghya Mondal
  • 71
  • 1
  • 1
  • 9
  • 1
    Only the form reloaded or new page is loaded when you press on buttons? – Roman C Feb 16 '16 at 15:10
  • 1
    Put them in session, or transmit them from every other page when redirecting to this one – Andrea Ligios Feb 16 '16 at 15:11
  • 2
    This is the kind of thing Spring Web Flow is useful for but you do not appear to be using Spring and the SWF > Sruts 2 plugin looks to be deprecated anyway. Looks like Struts 2 has a plugin that does something similar and which will handle your needs ( as well as borwser back/forward buttons etc.) https://cwiki.apache.org/confluence/display/S2PLUGINS/ActionFlow+Plugin And http://stackoverflow.com/questions/23267402/conversation-plugin-vs-actionflow – Alan Hay Feb 16 '16 at 16:03
  • I m using struts 2.0 and using property tags to store value of these fields in pojo. But on page reload, like that of save order, the form values don't stay, as seen in the second screen. – DebArghya Mondal Feb 16 '16 at 20:12
  • *Local Storage and other things didn't suffice.* - Why? Show your code. – Aleksandr M Feb 17 '16 at 11:22

0 Answers0