/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { BookingModel recBooking = (BookingModel)this.getOwner().getRecord(); return recBooking.calcBookingDates(m_recTour, m_recTourHeader); }
/** * Save the current value of this field to the registration database. */ public void saveValue() { BaseField field = this.getOwner(); RecordOwner recordOwner = field.getRecord().getRecordOwner(); if (recordOwner instanceof BasePanel) this.saveValue((BasePanel)recordOwner); } /**
/** * Save the current value of this field to the registration database. */ public void saveValue() { BaseField field = this.getOwner(); RecordOwner recordOwner = field.getRecord().getRecordOwner(); if (recordOwner instanceof BasePanel) this.saveValue((BasePanel)recordOwner); } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) if (m_fldMain != null) if (m_fldMain.getRecord() != owner) m_fldMain.addListener(new FieldRemoveBOnCloseHandler(this)); } /**
/** * Get the message to display in the message box. */ public String getDisplayMessage() { String strMessage = this.getOwner().getRecord().getField(BaseStatus.DESCRIPTION).toString(); return strMessage; }
/** * Get the detail record (dist's header) for this record. */ public Record getDetailRecord() { Record recCashBatchDetail = (Record)((BaseField)this.getField()).getRecord().getRecordOwner().getRecord(CashBatchDetail.CASH_BATCH_DETAIL_FILE); return recCashBatchDetail; } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) if (m_fldMain != null) if (m_fldMain.getRecord() != owner) m_fldMain.addListener(new FieldRemoveBOnCloseHandler(this)); } /**
private String getKeystoreLocation() { String keystore = null; if (this.getField() != null) if (((BaseField)this.getField()).getRecord().getRecordOwner() != null) keystore = ((BaseField)this.getField()).getRecord().getRecordOwner().getProperty("keystoreLocation"); if (keystore == null) keystore = "/usr/local/java/jdk/jre/lib/security/keystore"; // For now return keystore; }
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { int iErrorCode = super.fieldChanged(bDisplayOption, iMoveMode); if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; String strDesc = ((BookingDetail)this.getOwner().getRecord()).setupProductDesc(); iErrorCode = this.getOwner().getRecord().getField(BookingDetail.DESCRIPTION).setString(strDesc); return iErrorCode; }
private String getKeystoreLocation() { String keystore = null; if (this.getField() != null) if (((BaseField)this.getField()).getRecord().getRecordOwner() != null) keystore = ((BaseField)this.getField()).getRecord().getRecordOwner().getProperty("keystoreLocation"); if (keystore == null) keystore = "/usr/local/java/jdk/jre/lib/security/keystore"; // For now return keystore; }
/** * Add a destination/source field pair (on valid record, move dest to source). * @param iDestFieldSeq The destination field. * @param iSourceFieldSeq The source field. * @param bMoveToDependent If true adds a MoveOnValidHandler to the secondary record. * @param bMoveBackOnChange If true, adds a CopyFieldHandler to the destination field (moves to the source). */ public MoveOnValidHandler addFieldSeqPair(int iDestFieldSeq, int iSourceFieldSeq, boolean bMoveToDependent, boolean bMoveBackOnChange) { // BaseField will return iSourceFieldSeq if m_OwnerField is 'Y'es return this.addFieldPair(this.getOwner().getRecord().getField(iDestFieldSeq), m_record.getField(iSourceFieldSeq), bMoveToDependent, bMoveBackOnChange, null, null); } /**
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { if (iMoveMode != DBConstants.SCREEN_MOVE) // This is necessary if an override change the repondsTo. // Also, if just refreshing the record, don't change this if set if ((m_bChangeDataOnRefresh) || ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) != DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE)) if ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_UPDATE_LAST_READ) != DBConstants.OPEN_DONT_UPDATE_LAST_READ) // This is a special case where I want a subsequent write to get an error if changed this.setOriginalData(this.getOwner().getData()); return super.fieldChanged(bDisplayOption, iMoveMode); } /**
/** * Get the number of passengers in this hotel pricing category. */ public int getPaxInRoom() { Record recHotelPricing = ((BaseField)this.getOwner()).getRecord(); PaxCategory recPaxCategory = (PaxCategory)((ReferenceField)recHotelPricing.getField(HotelPricing.PAX_CATEGORY_ID)).getReferenceRecord(); if (recPaxCategory != null) return recPaxCategory.getPaxInRoom(); return 1; }
public boolean compareFieldToString() { boolean bMatch = super.compareFieldToString(); if (!bMatch) if (!this.getOwner().getRecord().getField(BookingDetail.MARKUP_FROM_LAST).isNull()) bMatch = true; return bMatch; } });
public Object doGetData() { double dStartBalance = this.getOwner().getRecord().getField(GenledScreenRecord.START_BALANCE).getValue(); double dChangeBalance = this.getOwner().getRecord().getField(GenledScreenRecord.CHANGE_BALANCE).getValue(); this.getOwner().setValue(dStartBalance + dChangeBalance); return super.doGetData(); } });
/** * Handle the record changed message. */ public int handleMessage(BaseMessage message) { RecordMessageHeader messageHeader = (RecordMessageHeader)message.getMessageHeader(); Record record = m_listener.getOwner().getRecord(); if (messageHeader.isRecordMatch(record)) // Double-check to make sure this is the right message record.refreshToCurrent(DBConstants.AFTER_UPDATE_TYPE, false); // This will cause a field changed event if it changed. return super.handleMessage(message); // Override this to process change } }
/** * Handle the record changed message. */ public int handleMessage(BaseMessage message) { RecordMessageHeader messageHeader = (RecordMessageHeader)message.getMessageHeader(); Record record = m_listener.getOwner().getRecord(); if (messageHeader.isRecordMatch(record)) // Double-check to make sure this is the right message record.refreshToCurrent(DBConstants.AFTER_UPDATE_TYPE, false); // This will cause a field changed event if it changed. return super.handleMessage(message); // Override this to process change } }
/** * Handle the record changed message. */ public int handleMessage(BaseMessage message) { RecordMessageHeader messageHeader = (RecordMessageHeader)message.getMessageHeader(); Record record = m_listener.getOwner().getRecord(); if (messageHeader.isRecordMatch(record)) // Double-check to make sure this is the right message record.refreshToCurrent(DBConstants.AFTER_UPDATE_TYPE, false); // This will cause a field changed event if it changed. return super.handleMessage(message); // Override this to process change } }
/** * Set the field that owns this listener. * @owner The field that this listener is being added to (if null, this listener is being removed). */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (this.getOwner() != null) this.syncBehaviorToRecord(this.getOwner().getRecord().getField(m_iMainFilesFieldSeq)); // Init now } /**