* Wrong behavior of non-automatic commit

Thanks to VOSS Com - resolution accepted
Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2870364
This commit is contained in:
Carlos Ruiz 2009-12-17 02:09:18 +00:00
parent f087312bb7
commit 2086c19318
2 changed files with 21 additions and 4 deletions

View File

@ -88,7 +88,7 @@ public class GridTable extends AbstractTableModel
/**
*
*/
private static final long serialVersionUID = 6148998589248950598L;
private static final long serialVersionUID = 9013625748218987868L;
/**
* JDBC Based Buffered Table
@ -158,6 +158,7 @@ public class GridTable extends AbstractTableModel
private boolean m_inserting = false;
/** Inserted Row number */
private int m_newRow = -1;
/** Is the Resultset open? */
private boolean m_open = false;
/** Compare to DB before save */
@ -3149,7 +3150,10 @@ private Object[] getDataAtRow(int row)
.append(",Tab=").append(m_TabNo).append("]").toString();
} // toString
public int getNewRow()
{
return m_newRow;
}
/**************************************************************************
* ASync Loader
@ -3471,6 +3475,7 @@ private Object[] getDataAtRow(int row)
return false;
}
/**
* get Parent Tab No
* @return Tab No

View File

@ -1320,8 +1320,20 @@ public final class APanel extends CPanel
}
}
else // Don't save
{
int newRecord= m_curTab.getTableModel().getNewRow(); //VOSS COM
if( newRecord == -1)
m_curTab.dataIgnore();
else
{
m_curWinTab.setSelectedIndex(m_curTabIndex);
setBusy(false, true);
return;
}
}
}
else // new record, but nothing changed
m_curTab.dataIgnore();
} // there is a change