Merge from trunk 10667

This commit is contained in:
Yuriy Artamonov 2013-03-28 13:59:32 +00:00
parent 9783739666
commit 134c530b72
2 changed files with 6 additions and 14 deletions

View File

@ -1,12 +1,7 @@
/*
* Copyright (c) 2011 Haulmont Technology Ltd. All Rights Reserved.
* Copyright (c) 2013 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
* Author: Konstantin Krivopustov
* Created: 21.03.11 19:05
*
* $Id$
*/
package com.haulmont.cuba.gui.components.actions;
@ -15,6 +10,7 @@ import com.haulmont.cuba.core.entity.Entity;
import com.haulmont.cuba.gui.components.Component;
import com.haulmont.cuba.gui.components.ListComponent;
import com.haulmont.cuba.gui.data.CollectionDatasource;
import com.haulmont.cuba.gui.data.Datasource;
import com.haulmont.cuba.gui.data.PropertyDatasource;
import com.haulmont.cuba.security.entity.EntityAttrAccess;
@ -102,7 +98,7 @@ public class ExcludeAction extends RemoveAction {
ds.excludeItem((Entity) item);
}
if (this.autocommit) {
if (autocommit && (ds.getCommitMode() != Datasource.CommitMode.PARENT)) {
try {
ds.commit();
} catch (RuntimeException e) {

View File

@ -1,12 +1,7 @@
/*
* Copyright (c) 2011 Haulmont Technology Ltd. All Rights Reserved.
* Copyright (c) 2013 Haulmont Technology Ltd. All Rights Reserved.
* Haulmont Technology proprietary and confidential.
* Use is subject to license terms.
* Author: Konstantin Krivopustov
* Created: 21.03.11 18:55
*
* $Id$
*/
package com.haulmont.cuba.gui.components.actions;
@ -15,6 +10,7 @@ import com.haulmont.cuba.core.entity.Entity;
import com.haulmont.cuba.gui.AppConfig;
import com.haulmont.cuba.gui.components.*;
import com.haulmont.cuba.gui.data.CollectionDatasource;
import com.haulmont.cuba.gui.data.Datasource;
import com.haulmont.cuba.gui.data.PropertyDatasource;
import com.haulmont.cuba.security.entity.EntityAttrAccess;
import com.haulmont.cuba.security.entity.EntityOp;
@ -184,7 +180,7 @@ public class RemoveAction extends ItemTrackingAction {
datasource.removeItem((Entity) item);
}
if (this.autocommit) {
if (autocommit && (datasource.getCommitMode() != Datasource.CommitMode.PARENT)) {
try {
datasource.commit();
} catch (RuntimeException e) {