File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes OO, Patterns, UML and Refactoring and the fly likes How to handle this scenario. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "How to handle this scenario." Watch "How to handle this scenario." New topic

How to handle this scenario.

Sheetal Rathore

Joined: Jul 22, 2010
Posts: 14
my web application has a main window. on clicking a link on main window it opens another window where user can make changes and this changes are required to be saved when user closes the window.

the window closes immediately and a request is sent to save the data.

now before the data is saved to DB if user clicks on same link he sees old data on the popup window.
(if user waits for some time before clicking on link again, this allows data to be saved and he can see latest data in that window)

how can I solve this problem?

I don't want to keep popup window open till the data is saved.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
User should not be attempting to click immediately on edit link after they just saved some new data.

If user sees old data in pop up window after an immediate click, then they should deal with it.

Depending upon how long it takes to update data in database, you can add a message that states that
it will take a few moments to update/save data.

You can also solve issue by removing the usage of pop-up windows.
Sheetal Rathore

Joined: Jul 22, 2010
Posts: 14
Thank you Jimmy. thats gives me enough ideas to ponder upon.
It is sorta covered in the JavaRanch Style Guide.
subject: How to handle this scenario.
It's not a secret anymore!