* 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:
parent
f087312bb7
commit
2086c19318
|
@ -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
|
||||
|
@ -3470,6 +3474,7 @@ private Object[] getDataAtRow(int row)
|
|||
// @TODO: configurable aggressive - compare each column with the DB
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get Parent Tab No
|
||||
|
|
|
@ -1320,8 +1320,20 @@ public final class APanel extends CPanel
|
|||
}
|
||||
}
|
||||
else // Don't save
|
||||
m_curTab.dataIgnore();
|
||||
}
|
||||
{
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue