/** * Add this field in the Record's field sequence. */ public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) field = new TourClassField(this, TOUR_CLASS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (field == null) field = super.setupField(iFieldSeq); return field; }
/** * Initialize class fields. */ public void init(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { super.init(record, strName, iDataLength, strDesc, strDefault); } /**
/** * Set up the default screen control for this field. * @param itsLocation Location of this component on screen (ie., GridBagConstraint). * @param targetScreen Where to place this component (ie., Parent screen or GridBagLayout). * @param converter The converter to set the screenfield to. * @param iDisplayFieldDesc Display the label? (optional). * @param properties Extra properties * @return Return the component or ScreenField that is created for this field. */ public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { return this.setupTablePopup(itsLocation, targetScreen, converter, iDisplayFieldDesc, this.makeReferenceRecord(), TourClass.CLASS_NAME_KEY, TourClass.CLASS_NAME, false, true); }
field = new TourStatusField(this, XLD_TOUR_STATUS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 17) field = new TourClassField(this, TOUR_CLASS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 18) field = new ProductCategoryField(this, PRODUCT_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
/** * Constructor. * @param record The parent record. * @param strName The field name. * @param iDataLength The maximum string length (pass -1 for default). * @param strDesc The string description (usually pass null, to use the resource file desc). * @param strDefault The default value (if object, this value is the default value, if string, the string is the default). */ public TourClassField(Record record, String strName, int iDataLength, String strDesc, Object strDefault) { this(); this.init(record, strName, iDataLength, strDesc, strDefault); } /**
field = new IntegerField(this, DETAIL_TOUR_DETAIL_COUNT, Constants.DEFAULT_FIELD_LENGTH, null, null); if (iFieldSeq == 20) field = new TourClassField(this, TOUR_CLASS_ID, 4, null, null); if (iFieldSeq == 21) field = new XmlField(this, INVOICE_TEXT, Constants.DEFAULT_FIELD_LENGTH, null, null);
if (iFieldSeq == 4) field = new TourClassField(this, TOUR_CLASS_ID, 8, null, null); field.setHidden(true); field.setNullable(false);
field = new TourClassField(this, TOUR_CLASS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null); field.addListener(new InitOnceFieldHandler(null));