Closing of popup dialog clears some of form fields

My functionality is as below Open a Popup dialog by clicking an action button User enters data on dialog fields Click on Save button which calls external service to save the data. If the data validation fails service throws an exception Catch exception and display the error message to user using custom popup dialog (Initial dialog is still open because it should be closed only data save is successful) Initial dialog’s fields are getting cleared, when user clicks on OK button of Error Popup dialog to close the error message. Custom error dialog’s Close action has been overridden to execute OK button action.  Any help on this issue is appreciated
1 answers

What happens if you connect the NPE object to the session object and when everything is ok remove the association and then close the page? Seems that either garbage collection is to aggressive or a rollback is taking place. To prevent the rollback change the error handling on the activity calling the external service to custom without rollback.

Hope one of the 2 suggestions will lead to a solution for your case.