From ce7b42b55dccdfc9ed7dc380e7e21f4be066dfe3 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 29 Apr 2017 18:13:10 +0200 Subject: [PATCH] IDEMPIERE-3355 Toolbar Process Button is always active even if has no process / integrate patch suggested by Vinicius Henrique Moraes (ViniMoraes) --- .../adempiere/webui/adwindow/AbstractADWindowContent.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 5fb7ab0eab..40bb65ad0a 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 @@ -1669,7 +1669,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements } boolean isNewRow = adTabbox.getSelectedGridTab().getRowCount() == 0 || adTabbox.getSelectedGridTab().isNew(); - toolbar.enableProcessButton(!isNewRow); + ADTabpanel adtab = (ADTabpanel) adTabbox.getSelectedTabpanel(); + toolbar.enableProcessButton(!isNewRow && adtab != null && adtab.getToolbarButtons().size() > 0); toolbar.enableArchive(!isNewRow); toolbar.enableZoomAcross(!isNewRow); toolbar.enableActiveWorkflows(!isNewRow); @@ -1685,7 +1686,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements //Deepak-Enabling customize button IDEMPIERE-364 if(!(adTabbox.getSelectedTabpanel() instanceof ADSortTab)) - toolbar.enableCustomize(((ADTabpanel)adTabbox.getSelectedTabpanel()).isGridView()); + toolbar.enableCustomize(adtab.isGridView()); } /**