/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(HotelScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(MessageInfoScreenRecord.kMessageProcessInfoID)).syncReference(this.getHeaderRecord()); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(HotelScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord())); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord())); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(HotelScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff FileListener subFileBehavior = new SubFileFilter(this.getRecord(Hotel.HOTEL_FILE)); this.getRecord(HotelMealPricing.HOTEL_MEAL_PRICING_FILE).addListener(subFileBehavior); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(MessageInfoScreenRecord.kMessageProcessInfoID)).syncReference(this.getHeaderRecord()); this.getScreenRecord().getField(MessageInfoScreenRecord.kMessageProcessInfoID).addListener(new FieldReSelectHandler(this)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(HotelScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff FileListener subFileBehavior = new SubFileFilter(this.getRecord(Hotel.HOTEL_FILE)); this.getRecord(HotelMealPricing.HOTEL_MEAL_PRICING_FILE).addListener(subFileBehavior); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(HotelScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff FileListener subFileBehavior = new SubFileFilter(this.getRecord(Hotel.HOTEL_FILE)); this.getRecord(HotelMealPricing.HOTEL_MEAL_PRICING_FILE).addListener(subFileBehavior); this.getRecord(Hotel.HOTEL_FILE).getField(Hotel.ID).addListener(new FieldReSelectHandler(this)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(HotelScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff FileListener subFileBehavior = new SubFileFilter(this.getRecord(Hotel.HOTEL_FILE)); this.getRecord(HotelMealPricing.HOTEL_MEAL_PRICING_FILE).addListener(subFileBehavior); this.getRecord(Hotel.HOTEL_FILE).getField(Hotel.ID).addListener(new FieldReSelectHandler(this)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(BundleDetailScreenRecord.BUNDLE_ID)).syncReference(this.getRecord(Bundle.BUNDLE_FILE)); // The detail file is the sub-file to to passed-in header record. this.getMainRecord().setKeyArea(BundleDetail.BUNDLE_ID_KEY); this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord())); // Any change to the bundle file triggers a re-select (note: SPopup read-thru will not respond) this.getRecord(Bundle.BUNDLE_FILE).getField(Bundle.ID).addListener(new FieldReSelectHandler(this)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(BundleDetailScreenRecord.BUNDLE_ID)).syncReference(this.getRecord(Bundle.BUNDLE_FILE)); // The detail file is the sub-file to to passed-in header record. this.getMainRecord().setKeyArea(BundleDetail.BUNDLE_ID_KEY); this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord())); // Any change to the bundle file triggers a re-select (note: SPopup read-thru will not respond) this.getRecord(Bundle.BUNDLE_FILE).getField(Bundle.ID).addListener(new FieldReSelectHandler(this)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff FileListener subFileBehavior = new SubFileFilter(this.getHeaderRecord()); this.getMainRecord().addListener(subFileBehavior); this.getHeaderRecord().getField(Product.ID).addListener(new FieldReSelectHandler(this)); this.getMainRecord().addListener(new CompareFileFilter(ProductPricing.END_DATE, this.getScreenRecord().getField(ProductScreenRecord.START_DATE), FileFilter.GREATER_THAN_EQUAL, null, true)); this.getScreenRecord().getField(ProductScreenRecord.START_DATE).addListener(new FieldReSelectHandler(this)); if (Boolean.TRUE.toString().equalsIgnoreCase(this.getProperty(this.getScreenRecord().getField(ProductScreenRecord.READ_ONLY).getFieldName()))) { this.setAppending(false); this.setEditing(false); } } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff FileListener subFileBehavior = new SubFileFilter(this.getHeaderRecord()); this.getMainRecord().addListener(subFileBehavior); this.getHeaderRecord().getField(Product.ID).addListener(new FieldReSelectHandler(this)); this.getMainRecord().addListener(new CompareFileFilter(ProductPricing.END_DATE, this.getScreenRecord().getField(ProductScreenRecord.START_DATE), FileFilter.GREATER_THAN_EQUAL, null, true)); this.getScreenRecord().getField(ProductScreenRecord.START_DATE).addListener(new FieldReSelectHandler(this)); if (Boolean.TRUE.toString().equalsIgnoreCase(this.getProperty(this.getScreenRecord().getField(ProductScreenRecord.READ_ONLY).getFieldName()))) { this.setAppending(false); this.setEditing(false); } } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(MessageInfoScreenRecord.kMessageInfoID)).syncReference(this.getHeaderRecord()); String strManualTransportID = Integer.toString(((ReferenceField)this.getMainRecord().getField(MessageProcessInfo.kDefaultMessageTransportID)).getIDFromCode(MessageTransport.MANUAL)); this.getMainRecord().getField(MessageProcessInfo.kDefaultMessageTransportID).addListener(new DisableOnFieldHandler(this.getMainRecord().getField(MessageProcessInfo.kInitialMessageStatusID), strManualTransportID, false)); Converter convCheckMark = new RadioConverter(this.getMainRecord().getField(MessageProcessInfo.kDefaultMessageTransportID), strManualTransportID, false); this.getMainRecord().getField(MessageProcessInfo.kDefaultMessageTransportID).addListener(new RemoveConverterOnFreeHandler(convCheckMark)); this.getMainRecord().getField(MessageProcessInfo.kDefaultMessageTransportID).addListener(new CopyDataHandler(this.getMainRecord().getField(MessageProcessInfo.kInitialMessageStatusID), null, convCheckMark)); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff this.getMainRecord().setKeyArea(ProductSearchDetail.PRODUCT_ID_KEY); Product recProduct = (Product)this.getHeaderRecord(); ProductType recProductType = (ProductType)((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_TYPE_ID)).getReferenceRecord(); int iProductTypeID = recProductType.getProductTypeID(recProduct); this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_TYPE_ID).setValue(iProductTypeID); this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord().getField(Product.ID), ProductSearchDetail.PRODUCT_ID, this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_TYPE_ID), ProductSearchDetail.PRODUCT_TYPE_ID, this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_SEARCH_TYPE_ID), ProductSearchDetail.PRODUCT_SEARCH_TYPE_ID)); if (Boolean.TRUE.toString().equalsIgnoreCase(this.getProperty(this.getScreenRecord().getField(ProductScreenRecord.READ_ONLY).getFieldName()))) { this.setAppending(false); this.setEditing(false); } this.addProductTypeFilter((ReferenceField)this.getRecord(ProductSearchDetail.PRODUCT_SEARCH_DETAIL_FILE).getField(ProductSearchDetail.PRODUCT_SEARCH_TYPE_ID)); SPopupBox control = (SPopupBox)this.getRecord(ProductSearchDetail.PRODUCT_SEARCH_DETAIL_FILE).getField(ProductSearchDetail.PRODUCT_SEARCH_TYPE_ID).getComponent(0); control.reSelectRecords(); this.getRecord(ProductSearchDetail.PRODUCT_SEARCH_DETAIL_FILE).getField(ProductSearchDetail.PRODUCT_SEARCH_TYPE_ID).addListener(new InitFieldHandler(this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_SEARCH_TYPE_ID))); } /**
/** * Add all the screen listeners. */ public void addListeners() { super.addListeners(); // Link the screen field to the passed in record ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord()); // Sub file stuff this.getMainRecord().setKeyArea(ProductSearchDetail.PRODUCT_ID_KEY); Product recProduct = (Product)this.getHeaderRecord(); ProductType recProductType = (ProductType)((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_TYPE_ID)).getReferenceRecord(); int iProductTypeID = recProductType.getProductTypeID(recProduct); this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_TYPE_ID).setValue(iProductTypeID); this.getMainRecord().addListener(new SubFileFilter(this.getHeaderRecord().getField(Product.ID), ProductSearchDetail.PRODUCT_ID, this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_TYPE_ID), ProductSearchDetail.PRODUCT_TYPE_ID, this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_SEARCH_TYPE_ID), ProductSearchDetail.PRODUCT_SEARCH_TYPE_ID)); if (Boolean.TRUE.toString().equalsIgnoreCase(this.getProperty(this.getScreenRecord().getField(ProductScreenRecord.READ_ONLY).getFieldName()))) { this.setAppending(false); this.setEditing(false); } this.addProductTypeFilter((ReferenceField)this.getRecord(ProductSearchDetail.PRODUCT_SEARCH_DETAIL_FILE).getField(ProductSearchDetail.PRODUCT_SEARCH_TYPE_ID)); SPopupBox control = (SPopupBox)this.getRecord(ProductSearchDetail.PRODUCT_SEARCH_DETAIL_FILE).getField(ProductSearchDetail.PRODUCT_SEARCH_TYPE_ID).getComponent(0); control.reSelectRecords(); this.getRecord(ProductSearchDetail.PRODUCT_SEARCH_DETAIL_FILE).getField(ProductSearchDetail.PRODUCT_SEARCH_TYPE_ID).addListener(new InitFieldHandler(this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_SEARCH_TYPE_ID))); } /**
((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(this.getHeaderRecord());
/** * SetupSFields Method. */ public void setupSFields() { // Make sure these are linked. Record recVen = ((ReferenceField)((BaseScreen)this.getParentScreen()).getHeaderRecord().getField(Product.VENDOR_ID)).getReferenceRecord((BaseScreen)this.getParentScreen()); Record recCurrency = ((ReferenceField)recVen.getField(Vendor.CURRENCYS_ID)).getReferenceRecord((BaseScreen)this.getParentScreen()); Record recProduct = ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).getReferenceRecord(null, false); if (recProduct == null) { // No product is linked to the product field (link the one from the main screen) recProduct = this.getHeaderRecord(); ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).setReferenceRecord(recProduct); } ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(recProduct); this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); recProduct.getField(Product.VENDOR_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Record recVendor = ((ReferenceField)recProduct.getField(Product.VENDOR_ID)).getReferenceRecord(); recVendor.getField(Vendor.CURRENCYS_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Record recCurrencys = ((ReferenceField)recVendor.getField(Vendor.CURRENCYS_ID)).getReferenceRecord(); recCurrencys.getField(Currencys.COSTING_RATE).setupDefaultView(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), this, ScreenConstants.DONT_DISPLAY_FIELD_DESC); } /**
/** * SetupSFields Method. */ public void setupSFields() { // Make sure these are linked. Record recVen = ((ReferenceField)((BaseScreen)this.getParentScreen()).getHeaderRecord().getField(Product.VENDOR_ID)).getReferenceRecord((BaseScreen)this.getParentScreen()); Record recCurrency = ((ReferenceField)recVen.getField(Vendor.CURRENCYS_ID)).getReferenceRecord((BaseScreen)this.getParentScreen()); Record recProduct = ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).getReferenceRecord(null, false); if (recProduct == null) { // No product is linked to the product field (link the one from the main screen) recProduct = this.getHeaderRecord(); ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).setReferenceRecord(recProduct); } ((ReferenceField)this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID)).syncReference(recProduct); this.getScreenRecord().getField(ProductScreenRecord.PRODUCT_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); recProduct.getField(Product.VENDOR_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Record recVendor = ((ReferenceField)recProduct.getField(Product.VENDOR_ID)).getReferenceRecord(); recVendor.getField(Vendor.CURRENCYS_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); Record recCurrencys = ((ReferenceField)recVendor.getField(Vendor.CURRENCYS_ID)).getReferenceRecord(); recCurrencys.getField(Currencys.COSTING_RATE).setupDefaultView(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST, ScreenConstants.DONT_SET_ANCHOR), this, ScreenConstants.DONT_DISPLAY_FIELD_DESC); } /**