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.

This commit is contained in:
Heng Sin Low 2013-09-05 00:41:16 +08:00
parent 90d2b6e605
commit 7eaa63bdbc
1 changed files with 13 additions and 0 deletions

View File

@ -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);
}
}