Detected a big bug (leading to data corruption) in swing client on WFActivity - user push OK button twice and the document is closed (completed with the first click, and closed with the second click)

- reproducible in GardenWorld via swing with requisition workflow
This commit is contained in:
Carlos Ruiz 2011-03-26 01:35:42 -05:00
parent b994e41c9e
commit ae59e247c0
1 changed files with 8 additions and 3 deletions

View File

@ -184,9 +184,9 @@ public class WFActivity extends CPanel
*/ */
private void dynInit(int WindowNo) private void dynInit(int WindowNo)
{ {
loadActivities();
// Forward // Forward
fForward = VLookup.createUser(WindowNo); fForward = VLookup.createUser(WindowNo);
loadActivities();
} // dynInit } // dynInit
/** /**
@ -434,6 +434,7 @@ public class WFActivity extends CPanel
*/ */
public int loadActivities() public int loadActivities()
{ {
resetDisplay(null);
while (selTableModel.getRowCount() > 0) while (selTableModel.getRowCount() > 0)
selTableModel.removeRow(0); selTableModel.removeRow(0);
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
@ -591,7 +592,8 @@ public class WFActivity extends CPanel
m_activity = null; m_activity = null;
m_column = null; m_column = null;
m_activity = new MWFActivity(Env.getCtx(),id.getRecord_ID(),null); if (id != null)
m_activity = new MWFActivity(Env.getCtx(),id.getRecord_ID(),null);
if (m_activity == null) if (m_activity == null)
{ {
@ -632,8 +634,11 @@ public class WFActivity extends CPanel
// //
if (e.getSource() == bZoom) if (e.getSource() == bZoom)
cmd_zoom(); cmd_zoom();
else if (e.getSource() == bOK) else if (e.getSource() == bOK) {
bOK.setEnabled(false);
cmd_OK(); cmd_OK();
bOK.setEnabled(true);
}
else if (e.getSource() == fAnswerButton) else if (e.getSource() == fAnswerButton)
cmd_button(); cmd_button();
// //