/** * Read the current file in the header record given the current detail record. */ public void syncHeaderToMain() { super.syncHeaderToMain(); // NOTE! This logic is VERY similar to the logic in getScreenURL, so change both. FileListener listener = this.getMainRecord().getListener(); while (listener != null) { if (listener instanceof FileFilter) { for (int iIndex = 0; iIndex < 4; iIndex++) { BaseField field = ((FileFilter)listener).getReferencedField(iIndex); if (field == null) break; if (field.getRecord() == this.getScreenRecord()) { // Okay here is one that needs to be added Utility.restoreFieldParam(this, field); } } } listener = (FileListener)listener.getNextListener(); } } /**
/** * Get the command string to restore screen. */ public String getScreenURL() { String strURL = super.getScreenURL(); // NOTE! This logic is VERY similar to the logic in syncHeaderToMain, so change both. FileListener listener = this.getMainRecord().getListener(); while (listener != null) { if (listener instanceof FileFilter) { for (int iIndex = 0; iIndex < 4; iIndex++) { BaseField field = ((FileFilter)listener).getReferencedField(iIndex); if (field == null) break; if (field.getRecord() == this.getScreenRecord()) { // Okay here is one that needs to be added strURL = Utility.addFieldParam(strURL, field); } } } listener = (FileListener)listener.getNextListener(); } return strURL; } }
/** * Read the current file in the header record given the current detail record. */ public void syncHeaderToMain() { super.syncHeaderToMain(); // NOTE! This logic is VERY similar to the logic in getScreenURL, so change both. FileListener listener = this.getMainRecord().getListener(); while (listener != null) { if (listener instanceof FileFilter) { for (int iIndex = 0; iIndex < 4; iIndex++) { BaseField field = ((FileFilter)listener).getReferencedField(iIndex); if (field == null) break; if (field.getRecord() == this.getScreenRecord()) { // Okay here is one that needs to be added Utility.restoreFieldParam(this, field); } } } listener = (FileListener)listener.getNextListener(); } } /**
/** * Get the command string to restore screen. */ public String getScreenURL() { String strURL = super.getScreenURL(); // NOTE! This logic is VERY similar to the logic in syncHeaderToMain, so change both. FileListener listener = this.getMainRecord().getListener(); while (listener != null) { if (listener instanceof FileFilter) { for (int iIndex = 0; iIndex < 4; iIndex++) { BaseField field = ((FileFilter)listener).getReferencedField(iIndex); if (field == null) break; if (field.getRecord() == this.getScreenRecord()) { // Okay here is one that needs to be added strURL = Utility.addFieldParam(strURL, field); } } } listener = (FileListener)listener.getNextListener(); } return strURL; } }