From ea70caa08a6362be3f64d8d038700f22c738378d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 12 Feb 2020 18:27:08 +0100 Subject: [PATCH] IDEMPIERE-4171 DB message on delete is lost --- org.adempiere.base/src/org/compiere/model/GridTable.java | 2 +- .../org/adempiere/webui/adwindow/AbstractADWindowContent.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 1570fed909..9f766fcdfb 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -3432,7 +3432,7 @@ public class GridTable extends AbstractTableModel e.setInfo(AD_Message, info, isError, !isError); } if (isError) - log.saveWarning(AD_Message, info); + log.saveError(AD_Message, info); fireDataStatusChanged (e); } // fireDataStatusEvent diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index d61389e870..9e5c311720 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -2462,9 +2462,11 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements if (result) { //error will be catch in the dataStatusChanged event - adTabbox.getSelectedGridTab().dataDelete(); + boolean success = adTabbox.getSelectedGridTab().dataDelete(); adTabbox.getSelectedGridTab().dataRefreshAll(true, true); adTabbox.getSelectedGridTab().refreshParentTabs(); + if (!success) + showLastError(); adTabbox.getSelectedTabpanel().dynamicDisplay(0); focusToActivePanel();