IDEMPIERE-4584 : InfoProduct throws "Attempted to access nonexistent … (#460)
* IDEMPIERE-4584 : InfoProduct throws "Attempted to access nonexistent ListModelTable field at 2, -1" if no IsInstanceAttribute column * IDEMPIERE-4584 : fix test of column index Co-Authored-By: hengsin <152246+hengsin@users.noreply.github.com> Co-authored-by: hengsin <152246+hengsin@users.noreply.github.com>
This commit is contained in:
parent
3013819d5a
commit
a7fbe30441
|
@ -52,7 +52,7 @@ public class InfoProductWindow extends InfoWindow {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7892916038089331016L;
|
||||
private static final long serialVersionUID = -640644572459126094L;
|
||||
|
||||
protected Tabbox tabbedPane;
|
||||
protected WListbox warehouseTbl;
|
||||
|
@ -357,11 +357,13 @@ public class InfoProductWindow extends InfoWindow {
|
|||
}
|
||||
}
|
||||
|
||||
Object value = contentPanel.getValueAt(row, findColumnIndex("IsInstanceAttribute"));
|
||||
if (value != null && value.toString().equals("true")) {
|
||||
m_PAttributeButton.setEnabled(true);
|
||||
} else {
|
||||
m_PAttributeButton.setEnabled(false);
|
||||
int colIdx = findColumnIndex("IsInstanceAttribute");
|
||||
|
||||
if (colIdx >= 0) {
|
||||
Object value = contentPanel.getValueAt(row, colIdx);
|
||||
if (value != null && value.toString().equals("true"))
|
||||
m_PAttributeButton.setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue