/** * AddSecondProfile Method. */ public void addSecondProfile(Record recProfile) { ReadSecondaryHandler behavior = new ReadSecondaryHandler(recProfile, Profile.PROFILE_CODE_KEY); behavior.setRespondsToMode(DBConstants.READ_MOVE, false); this.getField(Booking.PROFILE_CODE).addListener(behavior); behavior.addFieldSeqPair(Booking.PROFILE_ID, Profile.ID, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.PROFILE_CODE, Profile.PROFILE_CODE, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.GENERIC_NAME, Profile.GENERIC_NAME, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.ADDRESS_LINE_1, Profile.ADDRESS_LINE_1, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.ADDRESS_LINE_2, Profile.ADDRESS_LINE_2, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.CITY_OR_TOWN, Profile.CITY_OR_TOWN, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.COUNTRY, Profile.COUNTRY, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.STATE_OR_REGION, Profile.STATE_OR_REGION, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.POSTAL_CODE, Profile.POSTAL_CODE, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.TEL, Profile.TEL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.FAX, Profile.FAX, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.EMAIL, Profile.EMAIL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.LANGUAGE_ID, Profile.PRIMARY_LANGUAGE_ID, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.CURRENCYS_ID, Profile.CURRENCYS_ID, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); // Only move contact if not blank Converter convTrueIfContactNotBlank = new RadioConverter(this.getField(Booking.CONTACT), DBConstants.BLANK, true); recProfile.addListener(new RemoveConverterOnCloseHandler(convTrueIfContactNotBlank)); MoveOnValidHandler moveHandler = behavior.addFieldSeqPair(Booking.CONTACT, Profile.CONTACT, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, convTrueIfContactNotBlank, null); moveHandler.setDisableOnMove(false); } /**
ReadSecondaryHandler listenerDup = (ReadSecondaryHandler)this.getOwner().getListener(this.getClass()); while ((listenerDup != this) && (listenerDup != null)) if (listenerDup.getRecord() == this.getRecord()) if (listenerDup.getActualKeyArea() == this.getActualKeyArea()) listenerDup.setRecord(null); this.getOwner().removeListener(listenerDup, true); // Make sure there is only one break; listenerDup = (ReadSecondaryHandler)listenerDup.getListener(this.getClass()); this.fieldChanged(DBConstants.DISPLAY, DBConstants.READ_MOVE); // SCREEN_MOVE says this is coming from here if (m_bCloseOnFree) if (this.getDependentListener() != null) // If close and file is still open this.setDependentListener(null); // If case you want to delete me! if (m_record != null)
/** * Constructor. */ public ReadSecondaryHandler(Record record) { this(); this.init(null, record, DBConstants.MAIN_KEY_AREA, true, false, true); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.addMainKeyBehavior(); Hotel bkHotel = (Hotel)this.getMainRecord(); Vendor apVendor = (Vendor)this.getRecord(Vendor.VENDOR_FILE); ReadSecondaryHandler secondaryStuff = new ReadSecondaryHandler(apVendor, Vendor.ID_KEY); bkHotel.getField(Hotel.VENDOR_ID).addListener(secondaryStuff); ReadSecondaryHandler currSecond = new ReadSecondaryHandler(this.getRecord(Currencys.CURRENCYS_FILE), Currencys.CURRENCY_CODE_KEY); apVendor.getField(Vendor.CURRENCYS_ID).addListener(currSecond); BaseField checkMark = bkHotel.getField(Hotel.SAME_AS_VENDOR); secondaryStuff.addFieldSeqPair(Hotel.DESCRIPTION, Vendor.VENDOR_NAME, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.ADDRESS_LINE_1, Vendor.ADDRESS_LINE_1, DBConstants.MOVE_TO_DEPENDENT,DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.ADDRESS_LINE_2, Vendor.ADDRESS_LINE_2, DBConstants.MOVE_TO_DEPENDENT,DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.CITY_OR_TOWN, Vendor.CITY_OR_TOWN, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.STATE_OR_REGION, Vendor.STATE_OR_REGION, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.POSTAL_CODE, Vendor.POSTAL_CODE, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.COUNTRY, Vendor.COUNTRY, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.TEL, Vendor.TEL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.FAX, Vendor.FAX, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.EMAIL, Vendor.EMAIL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); } /**
/** * Add the behaviors needed to read the bundles in the addBundle method. */ public void addBundleBehaviors(Record recBundle, Record recBundleDetail, Record recItem) { if (recItem != null) recBundleDetail.getField(BundleDetail.BROCHURE_ID).addListener(new ReadSecondaryHandler(recItem)); recBundleDetail.addListener(new SubFileFilter(recBundle)); } /**
this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).addListener(new ReadSecondaryHandler(this.getRecord(Vendor.VENDOR_FILE))); if (this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).isNull()) this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).moveFieldToThis(this.getRecord(ApControl.AP_CONTROL_FILE).getField(ApControl.BROKER_VENDOR_ID)); this.removeRecord(recApTrx2); this.getMainRecord().addListener(new FreeOnFreeHandler(recApTrx2)); ReadSecondaryHandler listener = new ReadSecondaryHandler(recVendor2); listener.setRespondsToMode(DBConstants.READ_MOVE, false); listener.setRespondsToMode(DBConstants.INIT_MOVE, false); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.DRAFT_VENDOR_ID).addListener(listener); recVendor2.addListener(new RecountOnValidHandler(recApTrx2));
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { Record recTrxDesc = ((ReferenceField)this.getOwner().getRecord().getField(PaymentHistory.LINKED_TRX_DESC_ID)).getReference(); if (recTrxDesc != null) if (BankTrx.BANK_TRX_FILE.equalsIgnoreCase(recTrxDesc.getField(TrxDesc.DESC_CODE).toString())) return super.fieldChanged(bDisplayOption, iMoveMode); try { m_record.addNew(); } catch (DBException e) { } return DBConstants.NORMAL_RETURN; }
/** * Get the next grid record. * @param bFirstTime If true, I want the first record. * @return the next record (or null if EOF). */ public Record getNextGridRecord(boolean bFirstTime) throws DBException { Record record = super.getNextGridRecord(bFirstTime); if (record != null) { ReferenceField fldProductID = (ReferenceField)record.getField(BookingDetail.PRODUCT_ID); if (fldProductID.getListener(ReadSecondaryHandler.class.getName()) == null) { fldProductID.addListener(new ReadSecondaryHandler(fldProductID.getReferenceRecord())); } } return record; }
this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).addListener(new ReadSecondaryHandler(this.getRecord(Vendor.VENDOR_FILE))); if (this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).isNull()) this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).moveFieldToThis(this.getRecord(ApControl.AP_CONTROL_FILE).getField(ApControl.BROKER_VENDOR_ID)); this.removeRecord(recApTrx2); this.getMainRecord().addListener(new FreeOnFreeHandler(recApTrx2)); ReadSecondaryHandler listener = new ReadSecondaryHandler(recVendor2); listener.setRespondsToMode(DBConstants.READ_MOVE, false); listener.setRespondsToMode(DBConstants.INIT_MOVE, false); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.DRAFT_VENDOR_ID).addListener(listener); recVendor2.addListener(new RecountOnValidHandler(recApTrx2));
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.addMainKeyBehavior(); Hotel bkHotel = (Hotel)this.getMainRecord(); Vendor apVendor = (Vendor)this.getRecord(Vendor.VENDOR_FILE); ReadSecondaryHandler secondaryStuff = new ReadSecondaryHandler(apVendor, Vendor.ID_KEY); bkHotel.getField(Hotel.VENDOR_ID).addListener(secondaryStuff); ReadSecondaryHandler currSecond = new ReadSecondaryHandler(this.getRecord(Currencys.CURRENCYS_FILE), Currencys.CURRENCY_CODE_KEY); apVendor.getField(Vendor.CURRENCYS_ID).addListener(currSecond); BaseField checkMark = bkHotel.getField(Hotel.SAME_AS_VENDOR); secondaryStuff.addFieldSeqPair(Hotel.DESCRIPTION, Vendor.VENDOR_NAME, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.ADDRESS_LINE_1, Vendor.ADDRESS_LINE_1, DBConstants.MOVE_TO_DEPENDENT,DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.ADDRESS_LINE_2, Vendor.ADDRESS_LINE_2, DBConstants.MOVE_TO_DEPENDENT,DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.CITY_OR_TOWN, Vendor.CITY_OR_TOWN, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.STATE_OR_REGION, Vendor.STATE_OR_REGION, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.POSTAL_CODE, Vendor.POSTAL_CODE, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.COUNTRY, Vendor.COUNTRY, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.TEL, Vendor.TEL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.FAX, Vendor.FAX, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); secondaryStuff.addFieldSeqPair(Hotel.EMAIL, Vendor.EMAIL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, checkMark, null); } /**
/** * The Field has Changed. * If the flag is true, do inherited (read secondary), otherwise do initRecord. * @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). */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { if (m_convFlag.getState()) return super.fieldChanged(bDisplayOption, iMoveMode); else { try { m_record.initRecord(bDisplayOption); // Clear the fields m_record.addNew(); } catch(DBException ex) { ex.printStackTrace(); // Never } } return DBConstants.NORMAL_RETURN; } }
/** * Get the next grid record. * @param bFirstTime If true, I want the first record. * @return the next record (or null if EOF). */ public Record getNextGridRecord(boolean bFirstTime) throws DBException { Record record = super.getNextGridRecord(bFirstTime); if (record != null) { ReferenceField fldProductID = (ReferenceField)record.getField(BookingDetail.PRODUCT_ID); if (fldProductID.getListener(ReadSecondaryHandler.class.getName()) == null) { fldProductID.addListener(new ReadSecondaryHandler(fldProductID.getReferenceRecord())); } } return record; }
/** * AddSecondProfile Method. */ public void addSecondProfile(Record recProfile) { ReadSecondaryHandler behavior = new ReadSecondaryHandler(recProfile, Profile.PROFILE_CODE_KEY); behavior.setRespondsToMode(DBConstants.READ_MOVE, false); this.getField(Booking.PROFILE_CODE).addListener(behavior); behavior.addFieldSeqPair(Booking.PROFILE_ID, Profile.ID, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.PROFILE_CODE, Profile.PROFILE_CODE, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.GENERIC_NAME, Profile.GENERIC_NAME, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.ADDRESS_LINE_1, Profile.ADDRESS_LINE_1, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.ADDRESS_LINE_2, Profile.ADDRESS_LINE_2, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.CITY_OR_TOWN, Profile.CITY_OR_TOWN, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.COUNTRY, Profile.COUNTRY, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.STATE_OR_REGION, Profile.STATE_OR_REGION, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.POSTAL_CODE, Profile.POSTAL_CODE, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.TEL, Profile.TEL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.FAX, Profile.FAX, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.EMAIL, Profile.EMAIL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.LANGUAGE_ID, Profile.PRIMARY_LANGUAGE_ID, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); behavior.addFieldSeqPair(Booking.CURRENCYS_ID, Profile.CURRENCYS_ID, DBConstants.MOVE_TO_DEPENDENT, DBConstants.MOVE_DEPENDENT_BACK); // Only move contact if not blank Converter convTrueIfContactNotBlank = new RadioConverter(this.getField(Booking.CONTACT), DBConstants.BLANK, true); recProfile.addListener(new RemoveConverterOnCloseHandler(convTrueIfContactNotBlank)); MoveOnValidHandler moveHandler = behavior.addFieldSeqPair(Booking.CONTACT, Profile.CONTACT, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK, convTrueIfContactNotBlank, null); moveHandler.setDisableOnMove(false); } /**
this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).addListener(new ReadSecondaryHandler(this.getRecord(Vendor.VENDOR_FILE))); if (this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).isNull()) this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).moveFieldToThis(this.getRecord(ApControl.AP_CONTROL_FILE).getField(ApControl.BROKER_VENDOR_ID)); this.removeRecord(recApTrx2); this.getMainRecord().addListener(new FreeOnFreeHandler(recApTrx2)); ReadSecondaryHandler listener = new ReadSecondaryHandler(recVendor2); listener.setRespondsToMode(DBConstants.READ_MOVE, false); listener.setRespondsToMode(DBConstants.INIT_MOVE, false); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.DRAFT_VENDOR_ID).addListener(listener); recVendor2.addListener(new RecountOnValidHandler(recApTrx2));
ReadSecondaryHandler listenerDup = (ReadSecondaryHandler)this.getOwner().getListener(this.getClass()); while ((listenerDup != this) && (listenerDup != null)) if (listenerDup.getRecord() == this.getRecord()) if (listenerDup.getActualKeyArea() == this.getActualKeyArea()) listenerDup.setRecord(null); this.getOwner().removeListener(listenerDup, true); // Make sure there is only one break; listenerDup = (ReadSecondaryHandler)listenerDup.getListener(this.getClass()); this.fieldChanged(DBConstants.DISPLAY, DBConstants.READ_MOVE); // SCREEN_MOVE says this is coming from here if (m_bCloseOnFree) if (this.getDependentListener() != null) // If close and file is still open this.setDependentListener(null); // If case you want to delete me! if (m_record != null)
/** * Constructor. * @param record The secondary record to read. * @param iQueryKeyArea The key area to read from. */ public ReadSecondaryHandler(Record record, int iQueryKeyArea) { this(); this.init(null, record, iQueryKeyArea, true, false, true); } /**
/** * The Field has Changed. * If the flag is true, do inherited (read secondary), otherwise do initRecord. * @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). */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { if (m_convFlag.getState()) return super.fieldChanged(bDisplayOption, iMoveMode); else { try { m_record.initRecord(bDisplayOption); // Clear the fields m_record.addNew(); } catch(DBException ex) { ex.printStackTrace(); // Never } } return DBConstants.NORMAL_RETURN; } }
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); ((ReferenceField)this.getRecord(Tour.TOUR_FILE).getField(Tour.TOUR_HEADER_ID)).addListener(new ReadSecondaryHandler(this.getRecord(TourHeader.TOUR_HEADER_FILE))); } /**
recRequest.getField(Request.BUNDLE_QTY).addListener(new InitFieldHandler(recRequestControl.getField(RequestControl.BROCHURE_QTY))); ReadSecondaryHandler pSecondaryBehavior = new ReadSecondaryHandler(recProfile, Profile.PROFILE_CODE_KEY); pSecondaryBehavior.setRespondsToMode(DBConstants.READ_MOVE, false); recRequest.getField(Request.PROFILE_CODE).addListener(pSecondaryBehavior); pSecondaryBehavior.addFieldSeqPair(Request.PROFILE_ID); pSecondaryBehavior.addFieldSeqPair(Request.PROFILE_CODE, Profile.PROFILE_CODE, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.GENERIC_NAME, Profile.GENERIC_NAME, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.ADDRESS_LINE_1, Profile.ADDRESS_LINE_1, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.ADDRESS_LINE_2, Profile.ADDRESS_LINE_2, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.CITY_OR_TOWN, Profile.CITY_OR_TOWN, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.STATE_OR_REGION, Profile.STATE_OR_REGION, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.POSTAL_CODE, Profile.POSTAL_CODE, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.COUNTRY, Profile.COUNTRY, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.ATTENTION, Profile.NAME_ORDERED, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK); pSecondaryBehavior.addFieldSeqPair(Request.EMAIL, Profile.EMAIL, DBConstants.MOVE_TO_DEPENDENT, DBConstants.DONT_MOVE_DEPENDENT_BACK);
this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).addListener(new ReadSecondaryHandler(this.getRecord(Vendor.VENDOR_FILE))); if (this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).isNull()) this.getScreenRecord().getField(BrokerScreenRecord.VENDOR_ID).moveFieldToThis(this.getRecord(ApControl.AP_CONTROL_FILE).getField(ApControl.BROKER_VENDOR_ID)); this.removeRecord(recApTrx2); this.getMainRecord().addListener(new FreeOnFreeHandler(recApTrx2)); ReadSecondaryHandler listener = new ReadSecondaryHandler(recVendor2); listener.setRespondsToMode(DBConstants.READ_MOVE, false); listener.setRespondsToMode(DBConstants.INIT_MOVE, false); this.getRecord(ApTrx.AP_TRX_FILE).getField(ApTrx.DRAFT_VENDOR_ID).addListener(listener); recVendor2.addListener(new RecountOnValidHandler(recApTrx2));