Only use ConfirmCloseUtil when saving if you are in the UI (not from web services)

FEA: ItEr77S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-11-29 13:06:59 +01:00
parent c59a89e24e
commit 857ff0c533

View file

@ -365,9 +365,9 @@ public class SaveCommandBuilder {
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
// Reset timer of warning on leaving page
ConfirmCloseUtil.resetConfirmClose();
if (Executions.getCurrent() != null) {
// Reset timer of warning on leaving page
ConfirmCloseUtil.resetConfirmClose();
if (SecurityUtils.loggedUserCanWrite(state.getOrder())) {
ConfirmCloseUtil
.setConfirmClose(