From 7eaa63bdbc1eff3517376feb92f88ed1bee14da9 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 5 Sep 2013 00:41:16 +0800 Subject: [PATCH] IDEMPIERE-1283 click button "product attribute" after reselect in product info window, rise message "Attempted to access nonexistent ListModelTable field at ". Base on patch from Richard Morales Herrera. --- .../org/adempiere/webui/info/InfoProductWindow.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java index afd3bf99ba..e050f87f09 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java @@ -350,6 +350,10 @@ public class InfoProductWindow extends InfoWindow { private void onPAttributeClick() { Integer productInteger = getSelectedRowKey(); + if (productInteger == null) { + m_PAttributeButton.setEnabled(false); + return; + } String productName = (String)contentPanel.getValueAt(contentPanel.getSelectedRow(), findColumnIndex("Name")); if (productInteger == null || productInteger.intValue() == 0) @@ -822,4 +826,13 @@ public class InfoProductWindow extends InfoWindow { } super.prepareTable(layout, from, where, orderBy); } + + @Override + protected void executeQuery() { + super.executeQuery(); + if (m_PAttributeButton != null) + m_PAttributeButton.setEnabled(false); + } + + }