* 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
|
* JDBC Based Buffered Table
|
||||||
|
@ -158,6 +158,7 @@ public class GridTable extends AbstractTableModel
|
||||||
private boolean m_inserting = false;
|
private boolean m_inserting = false;
|
||||||
/** Inserted Row number */
|
/** Inserted Row number */
|
||||||
private int m_newRow = -1;
|
private int m_newRow = -1;
|
||||||
|
|
||||||
/** Is the Resultset open? */
|
/** Is the Resultset open? */
|
||||||
private boolean m_open = false;
|
private boolean m_open = false;
|
||||||
/** Compare to DB before save */
|
/** Compare to DB before save */
|
||||||
|
@ -3149,7 +3150,10 @@ private Object[] getDataAtRow(int row)
|
||||||
.append(",Tab=").append(m_TabNo).append("]").toString();
|
.append(",Tab=").append(m_TabNo).append("]").toString();
|
||||||
} // toString
|
} // toString
|
||||||
|
|
||||||
|
public int getNewRow()
|
||||||
|
{
|
||||||
|
return m_newRow;
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* ASync Loader
|
* ASync Loader
|
||||||
|
@ -3471,6 +3475,7 @@ private Object[] getDataAtRow(int row)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get Parent Tab No
|
* get Parent Tab No
|
||||||
* @return Tab No
|
* @return Tab No
|
||||||
|
|
|
@ -1320,8 +1320,20 @@ public final class APanel extends CPanel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // Don't save
|
else // Don't save
|
||||||
|
{
|
||||||
|
int newRecord= m_curTab.getTableModel().getNewRow(); //VOSS COM
|
||||||
|
|
||||||
|
if( newRecord == -1)
|
||||||
m_curTab.dataIgnore();
|
m_curTab.dataIgnore();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_curWinTab.setSelectedIndex(m_curTabIndex);
|
||||||
|
setBusy(false, true);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
else // new record, but nothing changed
|
else // new record, but nothing changed
|
||||||
m_curTab.dataIgnore();
|
m_curTab.dataIgnore();
|
||||||
} // there is a change
|
} // there is a change
|
||||||
|
|
Loading…
Reference in New Issue