/** * Override this to open the main file. * <p />You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)). * @return The new record. */ public Record openMainRecord() { return new Profile(this); } /**
if (recBooking.getField(Booking.PROFILE_ID).isNull()) Profile recProfile = new Profile(this.getOwner().findRecordOwner()); try { recProfile.setHandle(bookmarkMain, DBConstants.BOOKMARK_HANDLE); } catch (DBException ex) { ex.printStackTrace(); } finally { recProfile.free(); // This also releases all the listeners.
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); Booking recBooking = (Booking)this.getRecord(Booking.BOOKING_FILE); Profile recProfile = (Profile)this.getRecord(Profile.PROFILE_FILE); recBooking.addSecondProfile(recProfile); // Agency Secondary logic recProfile.setOpenMode(DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY); recProfile.addListener(new UpdateOnCloseHandler(null)); // Make sure profile information is updated } /**
recScreenQuery.getField(ProfileScreenRecord.PROFILE_KEY).addListener(keyBehavior); recProfile.addListener(new ExtractRangeFilter(Profile.POSTAL_CODE_SORT, recScreenQuery.getField(ProfileScreenRecord.POSTAL_CODE_SORT))); recProfile.addListener(new ExtractRangeFilter(Profile.NAME_SUR, recScreenQuery.getField(ProfileScreenRecord.LAST_NAME_SORT))); recProfile.addListener(new ExtractRangeFilter(Profile.NAME_SORT, recScreenQuery.getField(ProfileScreenRecord.NAME_SORT))); recProfile.addListener(new CompareFileFilter(Profile.PROFILE_TYPE_ID, recScreenQuery.getField(ProfileScreenRecord.PROFILE_TYPE_ID), "=", null, true));
if (recProfile != null) this.getScreenRecord().getField(BookingItineraryScreenRecord.MESSAGE_TRANSPORT_ID).moveFieldToThis(recProfile.getField(Profile.MESSAGE_TRANSPORT_ID)); if (this.getScreenRecord().getField(BookingItineraryScreenRecord.MESSAGE_TRANSPORT_ID).isNull()) MessageDetailTarget recMessageDetailTarget = recProfile.getNextMessageDetailTarget(); if (recMessageDetailTarget != null)
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); this.addMainKeyBehavior(); Profile recProfile = (Profile)this.getRecord(Profile.PROFILE_FILE); ProfileControl recProfileControl = (ProfileControl)this.getRecord(ProfileControl.PROFILE_CONTROL_FILE); try { recProfileControl.open(); // Read the control file recProfile.getField(Profile.PROFILE_STATUS_ID).addListener(new InitFieldHandler(recProfileControl.getField(ProfileControl.DEFAULT_PROFILE_STATUS_ID))); recProfile.getField(Profile.PROFILE_CLASS_ID).addListener(new InitFieldHandler(recProfileControl.getField(ProfileControl.DEFAULT_PROFILE_CLASS_ID))); recProfile.getField(Profile.PROFILE_TYPE_ID).addListener(new InitFieldHandler(recProfileControl.getField(ProfileControl.DEFAULT_PROFILE_TYPE_ID))); recProfile.getField(Profile.COUNTRY_ID).addListener(new InitFieldHandler(recProfileControl.getField(ProfileControl.COUNTRY_ID))); recProfile.getField(Profile.PRIMARY_LANGUAGE_ID).addListener(new InitFieldHandler(recProfileControl.getField(ProfileControl.LANGUAGE_ID))); recProfile.getField(Profile.CURRENCYS_ID).addListener(new InitFieldHandler(recProfileControl.getField(ProfileControl.CURRENCYS_ID))); } catch (DBException ex) { ex.printStackTrace(); } Record recCountry = ((ReferenceField)recProfile.getField(Profile.COUNTRY_ID)).getReferenceRecord(); recProfile.getField(Profile.COUNTRY_ID).addListener(new MoveOnChangeHandler(recProfile.getField(Profile.COUNTRY), recCountry.getField(Country.NAME))); recProfile.getField(Profile.COUNTRY_ID).addListener(new MoveOnChangeHandler(recProfile.getField(Profile.PRIMARY_LANGUAGE_ID), recCountry.getField(Country.LANGUAGE_ID))); recProfile.getField(Profile.COUNTRY_ID).addListener(new MoveOnChangeHandler(recProfile.getField(Profile.CURRENCYS_ID), recCountry.getField(Country.CURRENCYS_ID))); } /**
/** * User clicked to button to add the booking passengers to the profile. */ public int doCommand(boolean bDisplayOption, int iMoveMode) { BookingPax recBookingPax = (BookingPax)m_screenParent.getRecord(BookingPax.BOOKING_PAX_FILE); Profile recProfile = (Profile)m_screenParent.getRecord(Profile.PROFILE_FILE); Profile recProfileDetail = (Profile)((ReferenceField)recBookingPax.getField(BookingPax.PROFILE_ID)).getReferenceRecord(); recBookingPax.addPaxDetail(recBookingPax, recProfileDetail); // Now create the maint screen for this new record if (recProfileDetail.getEditMode() == DBConstants.EDIT_CURRENT) { BasePanel parentScreen = Screen.makeWindow(m_screenParent.getTask().getApplication()); ScreenParent screen = recProfileDetail.makeScreen(null, parentScreen, ScreenConstants.MAINT_MODE, true, true, true, true, null); } return DBConstants.NORMAL_RETURN; }
Profile recProfileDetail = (Profile)((ReferenceField)this.getField(BookingPax.PROFILE_ID)).getReferenceRecord(); FileListener selectListener = new PaxDetailSelectHandler((BookingPax)recordOwner.getRecord(BookingPax.BOOKING_PAX_FILE), recProfileDetail); recProfileDetail.addListener(selectListener); ((Record)recordOwner.getScreenRecord()).addListener(new FileRemoveBOnCloseHandler(selectListener)); recProfile.addListener(paxSelectListener);
/** * OpenHeaderRecord Method. */ public Record openHeaderRecord() { return new Profile(this); } /**
/** * Override this to open the main file. * <p />You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)). * @return The new record. */ public Record openMainRecord() { return new Profile(this); } /**
/** * Override this to open the main file. * <p />You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)). * @return The new record. */ public Record openMainRecord() { return new Profile(this); } /**
/** * Override this to open the main file. * <p />You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)). * @return The new record. */ public Record openMainRecord() { return new Profile(this); } /**
/** * Override this to open the other files in the query. */ public void openOtherRecords() { super.openOtherRecords(); new Profile(this); } /**
/** * Override this to open the other files in the query. */ public void openOtherRecords() { super.openOtherRecords(); new Profile(this); } /**
/** * Override this to open the other files in the query. */ public void openOtherRecords() { super.openOtherRecords(); new Profile(this); } /**
/** * Override this to open the other files in the query. */ public void openOtherRecords() { super.openOtherRecords(); new ArTrx(this); new Profile(this); new BookingLine(this); } /**
/** * Override this to open the other files in the query. */ public void openOtherRecords() { super.openOtherRecords(); new RequestControl(this); new Profile(this); new RequestDetail(this); new BundleDetail(this); new Brochure(this); } /**