[ 1805503 ] UI allows changing record while new record not saved

This commit is contained in:
Heng Sin Low 2008-01-14 02:30:19 +00:00
parent 271966a547
commit 0ecc70268c
2 changed files with 12 additions and 4 deletions

View File

@ -777,8 +777,14 @@ public class GridController extends CPanel
} }
else else
{ {
if (rowTable != rowCurrent) if (rowTable != rowCurrent) {
m_mTab.navigate(rowTable); //make sure table selection is consistent with model
int t = m_mTab.navigate(rowTable);
if (t != rowTable) {
rowTable = t;
vTable.setRowSelectionInterval(rowTable, rowTable);
}
}
dynamicDisplay(0); dynamicDisplay(0);
} }

View File

@ -498,7 +498,8 @@ public class VLookup extends JComponent
if (notFound) // <key> if (notFound) // <key>
{ {
m_value = null; m_value = null;
actionCombo (null); // data binding if (!m_inserting)
actionCombo (null); // data binding
log.fine(m_columnName + "=" + value + ": Not found"); log.fine(m_columnName + "=" + value + ": Not found");
} }
// we have lookup // we have lookup
@ -517,7 +518,8 @@ public class VLookup extends JComponent
if (m_combo.getSelectedItem() == null) if (m_combo.getSelectedItem() == null)
{ {
log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL"); log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL");
actionCombo (null); // data binding (calls setValue again) if (!m_inserting)
actionCombo (null); // data binding (calls setValue again)
m_value = null; m_value = null;
} }
} }