IDEMPIERE-523 can´t delete archive / Peer review

This commit is contained in:
Carlos Ruiz 2012-12-10 12:07:45 -05:00
parent 17a02687e0
commit f5a0756ca7
1 changed files with 6 additions and 30 deletions

View File

@ -492,7 +492,6 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
/** /**
* Update Query Display * Update Query Display
*/ */
private void updateQDisplay() private void updateQDisplay()
{ {
boolean reports = reportField.isChecked(); boolean reports = reportField.isChecked();
@ -507,16 +506,8 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
bPartnerField.setVisible(!reports); bPartnerField.setVisible(!reports);
} // updateQDisplay } // updateQDisplay
/* public void valueChange(ValueChangeEvent evt)
{
if (m_archives.length > 0)
updateArchive.setEnabled(true);
}
*/
public void cmd_deleteArchive(){ public void cmd_deleteArchive(){
FDialog.ask(m_WindowNo, this.form, "ArchiveDelete?", new Callback<Boolean>() { FDialog.ask(m_WindowNo, this.form, "DeleteRecord?", new Callback<Boolean>() {
@Override @Override
public void onCallback(Boolean result) public void onCallback(Boolean result)
@ -525,28 +516,12 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
{ {
MArchive ar = m_archives[m_index]; MArchive ar = m_archives[m_index];
ar.delete(true); ar.delete(true);
}
tabbox.setSelectedIndex(0); tabbox.setSelectedIndex(0);
dynInit(); dynInit();
} }
}
}); });
} }
/**
* Update Query Display
private void updateQDisplay()
{
boolean reports = reportField.isChecked();
log.config("Reports=" + reports);
// Show
processLabel.setVisible(reports);
processField.setVisible(reports);
// Hide
bPartnerLabel.setVisible(!reports);
bPartnerField.setVisible(!reports);
} // updateQDisplay
/** /**
* Update View Display * Update View Display
@ -571,13 +546,14 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
bBack.setEnabled(m_index > 0); bBack.setEnabled(m_index > 0);
bNext.setEnabled(m_index < m_archives.length-1); bNext.setEnabled(m_index < m_archives.length-1);
deleteArchive.setEnabled(m_archives.length > 0);
updateArchive.setEnabled(false); updateArchive.setEnabled(false);
log.info("Index=" + m_index + ", Length=" + m_archives.length); log.info("Index=" + m_index + ", Length=" + m_archives.length);
if (m_archives.length == 0) if (m_archives.length == 0)
{ {
positionInfo.setValue("No Record Found"); positionInfo.setValue(Msg.getMsg(Env.getCtx(), "NoRecordsFound"));
createdByField.setText(""); createdByField.setText("");
createdField.setValue(null); createdField.setValue(null);
nameField.setText(""); nameField.setText("");