From e630f73298b3c7aba782369ba9322b2cce92dcf4 Mon Sep 17 00:00:00 2001 From: hieplq Date: Thu, 15 Jun 2017 12:51:33 +0700 Subject: [PATCH] IDEMPIERE-3355:Toolbar Process Button is always active even if has no process cast exception --- .../webui/adwindow/AbstractADWindowContent.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 40bb65ad0a..ebe9518a56 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,8 +1669,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements } boolean isNewRow = adTabbox.getSelectedGridTab().getRowCount() == 0 || adTabbox.getSelectedGridTab().isNew(); - ADTabpanel adtab = (ADTabpanel) adTabbox.getSelectedTabpanel(); - toolbar.enableProcessButton(!isNewRow && adtab != null && adtab.getToolbarButtons().size() > 0); toolbar.enableArchive(!isNewRow); toolbar.enableZoomAcross(!isNewRow); toolbar.enableActiveWorkflows(!isNewRow); @@ -1685,8 +1683,14 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null); //Deepak-Enabling customize button IDEMPIERE-364 - if(!(adTabbox.getSelectedTabpanel() instanceof ADSortTab)) - toolbar.enableCustomize(adtab.isGridView()); + if(adTabbox.getSelectedTabpanel() instanceof ADSortTab){//consistent with updateToolbar + toolbar.enableProcessButton (false); + toolbar.enableCustomize(false); + }else{ + ADTabpanel adtab = (ADTabpanel) adTabbox.getSelectedTabpanel(); + toolbar.enableProcessButton(!isNewRow && adtab != null && adtab.getToolbarButtons().size() > 0); + toolbar.enableCustomize(adtab.isGridView()); + } } /**