Add The listeners to sync the property field with the virtual fields.
517114
public void addPropertyListeners()
    {
        BaseField fldProperties = this.getField(PropertiesRecord.PROPERTIES);
        if (fldProperties.getListener(CopyConvertersHandler.class) != null)
            return;
        
        this.addPropertiesFieldBehavior(this.getField(UserInfo.FRAMES), DBParams.FRAMES);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.JAVA), DBParams.JAVA);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.HOME), DBParams.HOME);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.MENU), DBParams.MENU);
        
        this.addPropertiesFieldBehavior(this.getField(UserInfo.BANNERS), DBParams.BANNERS);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.TRAILERS), DBParams.TRAILERS);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.MENUBARS), DBParams.MENUBARS);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.LOGOS), DBParams.LOGOS);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.NAV_MENUS), DBParams.NAVMENUS);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.MENU_DESC), DBParams.MENUDESC);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.HELP_PAGE), MenuConstants.USER_HELP_DISPLAY);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.LANGUAGE), DBParams.LANGUAGE);
        
        Record recContactType = ((ReferenceField)this.getField(UserInfo.CONTACT_TYPE_ID)).getReferenceRecord();
        this.getField(UserInfo.CONTACT_TYPE_ID).addListener(new ReadSecondaryHandler(recContactType));
        BaseField fldContactTypeCode = recContactType.getField(ContactType.CODE);
        CopyConvertersHandler listener = new CopyConvertersHandler(new PropertiesConverter(fldProperties, DBParams.CONTACT_TYPE), fldContactTypeCode);
        this.getField(UserInfo.CONTACT_TYPE_ID).addListener(listener);
        listener.setRespondsToMode(DBConstants.INIT_MOVE, false);
        listener.setRespondsToMode(DBConstants.READ_MOVE, false);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.CONTACT_TYPE_ID), DBParams.CONTACT_TYPE + DBParams.ID);
        this.addPropertiesFieldBehavior(this.getField(UserInfo.CONTACT_ID), DBParams.CONTACT_ID);
    }
275161
public boolean syncClonedListener(BaseField field, FieldListener listener, boolean bInitCalled)
    {
        if (!bInitCalled)
            listener.init(null);
        listener.setRespondsToMode(DBConstants.INIT_MOVE, m_bInitMove);
        listener.setRespondsToMode(DBConstants.READ_MOVE, m_bReadMove);
        listener.setRespondsToMode(DBConstants.SCREEN_MOVE, m_bScreenMove);
        return true;
    }
819041
public void addListeners()
    {
        super.addListeners();
        Record record = this.getMainRecord();
        Record recClassInfo = this.getRecord(ClassInfo.CLASS_INFO_FILE);
        if (recClassInfo != null)
        {
            record.setKeyArea(LogicFile.SEQUENCE_KEY);
            SubFileFilter listener = new SubFileFilter(recClassInfo.getField(ClassInfo.CLASS_NAME), LogicFile.METHOD_CLASS_NAME, null, null, null, null, true);
            record.addListener(listener);
            recClassInfo.getField(ClassInfo.CLASS_NAME).addListener(new FieldReSelectHandler(this));
        }
    }
1132167
public void addListeners()
    {
        super.addListeners();
        Record record = this.getMainRecord();
        Record recClassInfo = this.getRecord(ClassInfo.CLASS_INFO_FILE);
        if (recClassInfo != null)
        {
            record.setKeyArea(ClassFields.CLASS_INFO_CLASS_NAME_KEY);
            SubFileFilter listener = new SubFileFilter(recClassInfo.getField(ClassInfo.CLASS_NAME), ClassFields.CLASS_INFO_CLASS_NAME, null, null, null, null, true);
            record.addListener(listener);
            recClassInfo.getField(ClassInfo.CLASS_NAME).addListener(new FieldReSelectHandler(this));
        }
    }
910413
public void addListeners()
    {
        super.addListeners();
        this.setEditing(true);
        Record screenRecord = this.getScreenRecord();
        ReferenceField fldMessageInfoType = (ReferenceField)screenRecord.getField(MessageLogScreenRecord.MESSAGE_INFO_TYPE_ID);
    }
1263581
public void addListeners()
    {
        String strMessage = "Create new user account";
        String strTerms = this.getProperty("terms");    // Terms resource EY
        if (strTerms == null)
            strTerms = "terms";
        if (this.getTask() != null)
            if (this.getTask().getApplication() != null)
        {
            BaseApplication application = (BaseApplication)this.getTask().getApplication();
            strMessage = application.getResources(ResourceConstants.ERROR_RESOURCE, true).getString(strMessage);
        
            strTerms = application.getResources(ResourceConstants.DEFAULT_RESOURCE, true).getString(strTerms);
        }
        this.getScreenRecord().getField(UserScreenRecord.STATUS_LINE).setString(strMessage);
        this.getScreenRecord().getField(UserScreenRecord.TERMS).setString(strTerms);
        
        //x this.readCurrentUser();
        
        super.addListeners();
        
        FieldListener listener = this.getMainRecord().getField(UserInfo.USER_NAME).getListener(MainFieldHandler.class);
        if (listener != null)
            this.getMainRecord().getField(UserInfo.USER_NAME).removeListener(listener, true);   // Don't read current accounts
        
        this.getMainRecord().addListener(new UserPasswordHandler(false));
        
        this.addAutoLoginHandler();
    }
1170047
public void addPropertyChangeListener (String propertyName, java.beans.PropertyChangeListener listener)
    {
        this.propertyChangeDelegate.addPropertyChangeListener(propertyName, listener);
    }
709511
public void addListeners()
    {
        super.addListeners();
        Record record = this.getMainRecord();
        Record recClassInfo = this.getRecord(ClassInfo.CLASS_INFO_FILE);
        if (recClassInfo != null)
        {
            record.setKeyArea(FieldData.FIELD_FILE_NAME_KEY);
            SubFileFilter listener = new SubFileFilter(recClassInfo.getField(ClassInfo.CLASS_NAME), FieldData.FIELD_FILE_NAME, null, null, null, null, true);
            record.addListener(listener);
        }
        MainFieldHandler fieldBeh = new MainFieldHandler(null);
        this.getMainRecord().getField(FieldData.FIELD_NAME).addListener(fieldBeh);
        this.getMainRecord().setKeyArea(FieldData.FIELD_FILE_NAME_KEY);
    }
974517
public void addListeners()
    {
        super.addListeners();
        this.setEnabled(true);
        this.getRecord(Resource.RESOURCE_FILE).getField(Resource.CODE).setEnabled(false);
    }
1307039
public void addListeners()
    {
        super.addListeners();
            // Link the screen field to the passed in record
        ((ReferenceField)this.getScreenRecord().getField(MessageInfoScreenRecord.MESSAGE_PROCESS_INFO_ID)).syncReference(this.getHeaderRecord());
        this.getScreenRecord().getField(MessageInfoScreenRecord.MESSAGE_PROCESS_INFO_ID).addListener(new FieldReSelectHandler(this));
    }
366461
public boolean syncClonedListener(BaseField field, FieldListener listener, boolean bInitCalled)
    {
        if (!bInitCalled)
            ((CopySoundexHandler)listener).init(null, m_iFieldSeq);
        return super.syncClonedListener(field, listener, true);
    }
687569
public void addListeners()
    {
        super.addListeners();
        
            // Link the screen field to the passed in record
        ((ReferenceField)this.getScreenRecord().getField(ClassInfoScreenRecord.CLASS_PROJECT_ID)).syncReference(this.getHeaderRecord());
        this.getScreenRecord().getField(ClassInfoScreenRecord.CLASS_PROJECT_ID).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord().addListener(new ExtractRangeFilter(ClassInfo.CLASS_NAME, this.getScreenRecord().getField(ClassInfoScreenRecord.NAME)));
        this.getScreenRecord().getField(ClassInfoScreenRecord.NAME).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord().addListener(new ExtractRangeFilter(ClassInfo.CLASS_PACKAGE, this.getScreenRecord().getField(ClassInfoScreenRecord.PACKAGE)));
        this.getScreenRecord().getField(ClassInfoScreenRecord.PACKAGE).addListener(new FieldReSelectHandler(this));
    }
1171302
public void addListeners()
    {
        super.addListeners();
        
        // Link the screen field to the passed in record
        ((ReferenceField)this.getScreenRecord().getField(MessageInfoScreenRecord.MESSAGE_INFO_ID)).syncReference(this.getHeaderRecord());
        this.getScreenRecord().getField(MessageInfoScreenRecord.MESSAGE_INFO_ID).addListener(new FieldReSelectHandler(this));
        
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageProcessInfo.MESSAGE_TYPE_ID), this.getScreenRecord().getField(MessageInfoScreenRecord.MESSAGE_TYPE_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageInfoScreenRecord.MESSAGE_TYPE_ID).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageProcessInfo.PROCESS_TYPE_ID), this.getScreenRecord().getField(MessageInfoScreenRecord.PROCESS_TYPE_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageInfoScreenRecord.PROCESS_TYPE_ID).addListener(new FieldReSelectHandler(this));
        
        this.getScreenRecord().getField(MessageInfoScreenRecord.MESSAGE_INFO_TYPE_ID).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(MessageInfoScreenRecord.CONTACT_TYPE_ID).addListener(new FieldReSelectHandler(this));
        this.getScreenRecord().getField(MessageInfoScreenRecord.REQUEST_TYPE_ID).addListener(new FieldReSelectHandler(this));
        // This is a little inefficient, but this filter is not used much.
        this.getMainRecord().addListener(new FileFilter(null)
        {
            /**
             * Set up/do the remote criteria.
             * @param strbFilter The SQL query string to add to.
             * @param bIncludeFileName Include the file name with this query?
             * @param vParamList The param list to add the raw data to (for prepared statements).
             * @return True if you should not skip this record (does a check on the local data).
             */
            public boolean doLocalCriteria(StringBuffer strbFilter, boolean bIncludeFileName, Vector<BaseField> vParamList)
            {
                Record recMessageInfoScreenRecord = getScreenRecord();
                if (recMessageInfoScreenRecord != null)
                    if ((!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.MESSAGE_INFO_TYPE_ID).isNull())
                        || (!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.CONTACT_TYPE_ID).isNull())
                        || (!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.REQUEST_TYPE_ID).isNull()))
                {
                    // Note I move the MessageInfoField to a temp field since the reference is a header filter.
                            recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.MESSAGE_INFO_COMPARE_ID).moveFieldToThis(this.getOwner().getField(MessageProcessInfo.MESSAGE_INFO_ID));
                            Record recMessageInfo = ((ReferenceField)recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.MESSAGE_INFO_COMPARE_ID)).getReference();
                            if (recMessageInfo != null)
                            {
                                if (!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.MESSAGE_INFO_TYPE_ID).isNull())
                                    if (!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.MESSAGE_INFO_TYPE_ID).equals(recMessageInfo.getField(MessageInfo.MESSAGE_INFO_TYPE_ID)))
                                        return false;
                                if (!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.CONTACT_TYPE_ID).isNull())
                                    if (!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.CONTACT_TYPE_ID).equals(recMessageInfo.getField(MessageInfo.CONTACT_TYPE_ID)))
                                        return false;
                                if (!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.REQUEST_TYPE_ID).isNull())
                                    if (!recMessageInfoScreenRecord.getField(MessageInfoScreenRecord.REQUEST_TYPE_ID).equals(recMessageInfo.getField(MessageInfo.REQUEST_TYPE_ID)))
                                        return false;
                            }
                        }
                        return super.doLocalCriteria(strbFilter, bIncludeFileName, vParamList);                
                    }
         
                });
    }
1048102
public void addListeners()
    {
        super.addListeners();
        
        this.addListener(new DateChangedHandler((DateTimeField)this.getField(Person.DATE_CHANGED)));
        this.addListener(new SetUserIDHandler(Person.CHANGED_ID, false));
        
        this.getField(Person.NAME).addListener(new CopyLastHandler(this.getField(Person.NAME_SORT)));    // Only if dest is null (ie., company name is null)
        this.getField(Person.NAME_SORT).addListener(new FieldToUpperHandler(null));
        
        this.getField(Person.POSTAL_CODE).addListener(new CopyFieldHandler(this.getField(Person.POSTAL_CODE_SORT)));
    }
744803
public void addListeners()
    {
        super.addListeners();
        this.getMainRecord().getField(Registration.RESOURCE_ID).addListener(new ReadSecondaryHandler(this.getRecord(Resource.RESOURCE_FILE)));
    }
1045575
public void add(Listener listener) {
        logger.trace("Adding listener [{}]", listener);
        synchronized (listeners) {
            listeners.add(listener);
        }
    }
1166459
public void addListeners()
    {
        // This beginning code is a trick to make the grid screen think that a zero record is the header.
        this.setProperty("fakeHeader", DBConstants.FALSE);
        if (m_recHeader != null)
            if ((m_recHeader.getEditMode() == DBConstants.EDIT_ADD) || (m_recHeader.getEditMode() == DBConstants.EDIT_NONE))
                if (this.getProperty(DBParams.HEADER_OBJECT_ID) == null)
                {
                    this.setProperty("fakeHeader", DBConstants.TRUE);
                    this.setProperty(DBParams.HEADER_OBJECT_ID, "0");
                    if (m_recHeader.getCounterField() != null)
                        if (m_recHeader.getCounterField().getDefault() == null)
                    {
                        m_recHeader.getCounterField().setDefault(new Integer(0)); // This will guarantee that the sub record's parent field is non-null
                        try {
                            m_recHeader.addNew();
                        } catch (DBException ex) {
                        }
                    }
                }
        super.addListeners();
    }