/** * Called when a valid record is read from the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnValid); super.doValidRecord(bDisplayOption); } /**
/** * Called when a new blank record is required for the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnNew); super.doNewRecord(bDisplayOption); } /**
/** * Called when a new blank record is required for the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnNew); super.doNewRecord(bDisplayOption); } /**
/** * Called when a valid record is read from the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnValid); super.doValidRecord(bDisplayOption); } /**
/** * Called when a new blank record is required for the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnNew); super.doNewRecord(bDisplayOption); } /**
/** * Called when a valid record is read from the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnValid); super.doValidRecord(bDisplayOption); } /**
public void setEnabled(boolean bEnableFlag) // Init this field override for other value { if (bEnableFlag) { Record recTourHeader = this.getOwner(); bEnableFlag = recTourHeader.getField(TourHeader.TOUR_SERIES).getState(); // Only for series tours } super.setEnabled(bEnableFlag); // Init this field override for other value } };
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner == null) return; if (fieldName != null) m_fldTarget = this.getOwner().getField(fieldName); if (m_fldTarget != null) if (m_fldTarget.getRecord() != this.getOwner()) // If field is not in this file, remember to remove it m_fldTarget.addListener(new FieldRemoveBOnCloseHandler(this)); if ((this.getOwner().getEditMode() == DBConstants.EDIT_CURRENT) || (this.getOwner().getEditMode() == DBConstants.EDIT_IN_PROGRESS)) this.setEnabled(m_bEnableOnValid); if (this.getOwner().getEditMode() == DBConstants.EDIT_ADD) this.setEnabled(m_bEnableOnNew); } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner == null) return; if (m_iFieldSeq != -1) m_fldTarget = this.getOwner().getField(m_iFieldSeq); if (m_fldTarget != null) if (m_fldTarget.getRecord() != this.getOwner()) // If field is not in this file, remember to remove it m_fldTarget.addListener(new FieldRemoveBOnCloseHandler(this)); if ((this.getOwner().getEditMode() == DBConstants.EDIT_CURRENT) || (this.getOwner().getEditMode() == DBConstants.EDIT_IN_PROGRESS)) this.setEnabled(m_bEnableOnValid); if (this.getOwner().getEditMode() == DBConstants.EDIT_ADD) this.setEnabled(m_bEnableOnNew); } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner == null) return; if (m_iFieldSeq != -1) m_fldTarget = this.getOwner().getField(m_iFieldSeq); if (m_fldTarget != null) if (m_fldTarget.getRecord() != this.getOwner()) // If field is not in this file, remember to remove it m_fldTarget.addListener(new FieldRemoveBOnCloseHandler(this)); if ((this.getOwner().getEditMode() == DBConstants.EDIT_CURRENT) || (this.getOwner().getEditMode() == DBConstants.EDIT_IN_PROGRESS)) this.setEnabled(m_bEnableOnValid); if (this.getOwner().getEditMode() == DBConstants.EDIT_ADD) this.setEnabled(m_bEnableOnNew); } /**