IDEMPIERE-5702 - IndexOutOfBoundsException on Info Window (#1812)
* IDEMPIERE-5702 - IndexOutOfBoundsException on Info Window * IDEMPIERE-5702 - pr1812 patch by Heng Sin
This commit is contained in:
parent
d53570eb75
commit
f82777c527
|
@ -2965,8 +2965,6 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
cacheOriginalValues(rowIndex);
|
||||
|
||||
int gridFieldsOffset = 1; // First column is the id, and its not on the infoColumns
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Object> row = (List<Object>)oRow;
|
||||
List<Object> originalSelectedRow = temporarySelectedData.get(keyViewValue);
|
||||
|
@ -2974,15 +2972,14 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
// While restoring values we dong want to trigger listeners
|
||||
model.removeTableModelListener(this);
|
||||
|
||||
for(int i=0; i < infoColumns.length; i++)
|
||||
|
||||
for(int i=0; i < columnInfos.length; i++)
|
||||
{
|
||||
if(infoColumns[i].isReadOnly() == false) // Only replace editable column, in case some other data changed on db
|
||||
if(columnInfos[i].isReadOnly() == false) // Only replace editable column, in case some other data changed on db
|
||||
{
|
||||
int colIndex = i + gridFieldsOffset;
|
||||
Object obj = originalSelectedRow.get(colIndex);
|
||||
model.setValueAt( obj, rowIndex, colIndex);
|
||||
}
|
||||
Object obj = originalSelectedRow.get(i);
|
||||
model.setValueAt( obj, rowIndex, i);
|
||||
}
|
||||
}
|
||||
|
||||
// Restore isSelected status on IDColumn
|
||||
|
|
Loading…
Reference in New Issue