/** * The Field has Changed. * Initialize the target field also. * @param bDisplayOption If true, display the change. * @param iMoveMode The type of move being done (init/read/screen). * @return The error code (or NORMAL_RETURN if okay). * Field Changed, init the field. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { if (m_bSetModified) m_fldTarget.setModified(true); return m_fldTarget.handleFieldChanged(bDisplayOption, iMoveMode); // init dependent field } }
/** * The Field has Changed. * Initialize the target field also. * @param bDisplayOption If true, display the change. * @param iMoveMode The type of move being done (init/read/screen). * @return The error code (or NORMAL_RETURN if okay). * Field Changed, init the field. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { if (m_bSetModified) m_fldTarget.setModified(true); return m_fldTarget.handleFieldChanged(bDisplayOption, iMoveMode); // init dependent field } }
/** * The Field has Changed. * Initialize the target field also. * @param bDisplayOption If true, display the change. * @param iMoveMode The type of move being done (init/read/screen). * @return The error code (or NORMAL_RETURN if okay). * Field Changed, init the field. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { if (m_bSetModified) m_fldTarget.setModified(true); return m_fldTarget.handleFieldChanged(bDisplayOption, iMoveMode); // init dependent field } }
/** * Restore the field's modified status to this. * @param bNonKeyOnly If we are talking about non current key fields only. * @return true if any fields have changed. */ public void setModified(boolean[] rgbModified) { int iFieldCount = this.getFieldCount(); // BaseField Count for (int iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq < iFieldCount + DBConstants.MAIN_FIELD; iFieldSeq++) { BaseField field = this.getField(iFieldSeq); if (iFieldSeq < rgbModified.length) field.setModified(rgbModified[iFieldSeq]); } } /**
/** * Restore the field's modified status to this. * @param bNonKeyOnly If we are talking about non current key fields only. * @return true if any fields have changed. */ public void setModified(boolean[] rgbModified) { int iFieldCount = this.getFieldCount(); // BaseField Count for (int iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq < iFieldCount + DBConstants.MAIN_FIELD; iFieldSeq++) { BaseField field = this.getField(iFieldSeq); if (iFieldSeq < rgbModified.length) field.setModified(rgbModified[iFieldSeq]); } } /**
/** * Restore the field's modified status to this. * @param bNonKeyOnly If we are talking about non current key fields only. * @return true if any fields have changed. */ public void setModified(boolean[] rgbModified) { int iFieldCount = this.getFieldCount(); // BaseField Count for (int iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq < iFieldCount + DBConstants.MAIN_FIELD; iFieldSeq++) { BaseField field = this.getField(iFieldSeq); if (iFieldSeq < rgbModified.length) field.setModified(rgbModified[iFieldSeq]); } } /**
/** * Tell report module to print the report detail. * <p>Note: This does not maintain an independent variable, I fake that the screen fields * have been modified, because this signals the report module to print. * @param bPrintReport If true, set print report. */ public void setPrintReport(boolean bPrintReport) { if (bPrintReport) if (this.getScreenRecord() != null) // This tells the RecordHtmlScreen to display the data this.getScreenRecord().getField(DBConstants.MAIN_FIELD).setModified(true); // Flag screen record, so toolbar knows } /**
/** * Tell report module to print the report detail. * <p>Note: This does not maintain an independent variable, I fake that the screen fields * have been modified, because this signals the report module to print. * @param bPrintReport If true, set print report. */ public void setPrintReport(boolean bPrintReport) { if (bPrintReport) if (this.getScreenRecord() != null) // This tells the RecordHtmlScreen to display the data this.getScreenRecord().getField(Constants.MAIN_FIELD).setModified(true); // Flag screen record, so toolbar knows } /**
/** * Restore the field's modified status to this? * @param bNonKeyOnly If we are talking about non current key fields only. * @return true if any fields have changed. */ public void setModified(boolean[] rgbModified) { boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) { KeyField keyField = this.getKeyField(iKeyFieldSeq, bForceUniqueKey); BaseField field = keyField.getField(DBConstants.FILE_KEY_AREA); if (iKeyFieldSeq < rgbModified.length) field.setModified(rgbModified[iKeyFieldSeq]); } } /**
/** * Restore the field's modified status to this? * @param bNonKeyOnly If we are talking about non current key fields only. * @return true if any fields have changed. */ public void setModified(boolean[] rgbModified) { boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) { KeyField keyField = this.getKeyField(iKeyFieldSeq, bForceUniqueKey); BaseField field = keyField.getField(DBConstants.FILE_KEY_AREA); if (iKeyFieldSeq < rgbModified.length) field.setModified(rgbModified[iKeyFieldSeq]); } } /**
/** * Restore the field's modified status to this? * @param bNonKeyOnly If we are talking about non current key fields only. * @return true if any fields have changed. */ public void setModified(boolean[] rgbModified) { boolean bForceUniqueKey = true; int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false); for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++) { KeyField keyField = this.getKeyField(iKeyFieldSeq, bForceUniqueKey); BaseField field = keyField.getField(DBConstants.FILE_KEY_AREA); if (iKeyFieldSeq < rgbModified.length) field.setModified(rgbModified[iKeyFieldSeq]); } } /**
/** * DoInitialKey Method. */ public void doInitialKey() { this.getOwner().getField(LandPricing.CLASS_ID).setValue(m_iSicPmc); this.getOwner().getField(LandPricing.CLASS_ID).setModified(true); ((DateTimeField)this.getOwner().getField(LandPricing.END_DATE)).setDate(m_dateTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); this.getOwner().getField(LandPricing.END_DATE).setModified(true); this.getOwner().getField(LandPricing.TO_PAX).setValue(m_sTargetPax); this.getOwner().getField(LandPricing.TO_PAX).setModified(true); super.doInitialKey(); // This is the starting key, set the initial position } /**
/** * DoInitialKey Method. */ public void doInitialKey() { this.getOwner().getField(LandPricing.CLASS_ID).setValue(m_iSicPmc); this.getOwner().getField(LandPricing.CLASS_ID).setModified(true); ((DateTimeField)this.getOwner().getField(LandPricing.END_DATE)).setDate(m_dateTarget, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE); this.getOwner().getField(LandPricing.END_DATE).setModified(true); this.getOwner().getField(LandPricing.TO_PAX).setValue(m_sTargetPax); this.getOwner().getField(LandPricing.TO_PAX).setModified(true); super.doInitialKey(); // This is the starting key, set the initial position } /**
/** * DoEndKey Method. */ public void doEndKey() { this.getOwner().getField(LandPricing.CLASS_ID).setValue(m_iSicPmc); this.getOwner().getField(LandPricing.CLASS_ID).setModified(true); super.doEndKey(); // This is the starting key, set the initial position } /**
/** * DoEndKey Method. */ public void doEndKey() { this.getOwner().getField(LandPricing.CLASS_ID).setValue(m_iSicPmc); this.getOwner().getField(LandPricing.CLASS_ID).setModified(true); super.doEndKey(); // This is the starting key, set the initial position } /**
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) { Record recUserInfo = this.getOwner(); RecordOwner recordOwner = recUserInfo.getRecordOwner(); Record recUserScreenRecord = (Record)recordOwner.getScreenRecord(); recUserScreenRecord.getField(UserScreenRecord.CURRENT_PASSWORD).setModified(false); recUserScreenRecord.getField(UserScreenRecord.CURRENT_PASSWORD).setData(null); recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_1).setData(null, DBConstants.DISPLAY, DBConstants.INIT_MOVE); recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_2).setData(null, DBConstants.DISPLAY, DBConstants.INIT_MOVE); recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_1).setModified(false); recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_2).setModified(false); recUserScreenRecord.getField(UserScreenRecord.STATUS_LINE).setString(DBConstants.BLANK); super.doValidRecord(bDisplayOption); } /**
/** * DoNewRecord Method. */ public void doNewRecord(boolean bDisplayOption) { super.doNewRecord(bDisplayOption); BaseField fldTarget = this.getOwner().getField(m_iTypeField); boolean[] rgbEnabled = fldTarget.setEnableListeners(false); InitOnceFieldHandler listener = (InitOnceFieldHandler)fldTarget.getListener(InitOnceFieldHandler.class.getName()); if (listener != null) listener.setFirstTime(true); // Special case - you shouldn't have put this listener here, but since you did... fldTarget.setValue(m_iTargetValue, DBConstants.DISPLAY, DBConstants.INIT_MOVE); fldTarget.setModified(false); fldTarget.setEnableListeners(rgbEnabled); } /**
/** * DoNewRecord Method. */ public void doNewRecord(boolean bDisplayOption) { super.doNewRecord(bDisplayOption); BaseField fldTarget = this.getOwner().getField(m_iTypeField); boolean[] rgbEnabled = fldTarget.setEnableListeners(false); InitOnceFieldHandler listener = (InitOnceFieldHandler)fldTarget.getListener(InitOnceFieldHandler.class.getName()); if (listener != null) listener.setFirstTime(true); // Special case - you shouldn't have put this listener here, but since you did... fldTarget.setValue(m_iTargetValue, DBConstants.DISPLAY, DBConstants.INIT_MOVE); fldTarget.setModified(false); fldTarget.setEnableListeners(rgbEnabled); } /**
/** * Set this property in the user's property area. * @param strLanguage The language code. */ public void setLanguage(String strLanguage) { Record recUserInfo = this.getUserInfo(); if (recUserInfo != null) { boolean flag = recUserInfo.getField(UserInfo.kProperties).isModified(); boolean[] brgEnabled = recUserInfo.getField(UserInfo.kProperties).setEnableListeners(false); ((PropertiesField)recUserInfo.getField(UserInfo.kProperties)).setProperty(DBParams.LANGUAGE, strLanguage); recUserInfo.getField(UserInfo.kProperties).setModified(flag); recUserInfo.getField(UserInfo.kProperties).setEnableListeners(brgEnabled); } super.setLanguage(strLanguage); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); if (this.getHeaderRecord() instanceof BankTrx) { this.getHeaderRecord().setOpenMode(this.getHeaderRecord().getOpenMode() | DBConstants.OPEN_READ_ONLY); if (this.getHeaderRecord().getField(BankTrx.BANK_ACCT_ID).isNull()) { ApControl recApControl = new ApControl(this); this.getHeaderRecord().getField(BankTrx.BANK_ACCT_ID).moveFieldToThis(recApControl.getField(ApControl.AP_BANK_ACCT_ID)); this.getHeaderRecord().getField(BankTrx.BANK_ACCT_ID).setModified(false); } } } /**