Hi, I hope someone out there can help me with this problem. I'm still new to Hibernate so be gentle. Here's my problem….
I have a JSP page with customer data that is managed by Hibernate. There are some text fields where the user can change information (such as phone number, address, etc) in addition to some links that the user can select to drill down into customer-specific information (orders). Since the user may have modified any of the text fields prior to drilling down into the order info, I save the customer data before going on to the next screen.
The problem occurs when the user selects the BACK button on the browser to return to the main customer page from the “drill down” page instead of selecting the CANCEL or SAVE button. Selecting CANCEL or SAVE would cause the main page to refresh itself while selecting the BACK button does not. Obviously the “version” field in the DB is now out of date with the JSP page and any subsequent saves on this page will cause Hibernate to throw a StaleObjectStateException. I already have meta tags in my JSP page for no-cache, but that doesn’t seem to be helping.
Any thoughts?
Thanks for the help.
|