Add all the screen listeners.
181695
public void addListeners()
    {
        super.addListeners();
        
        if (this.isContactDisplay())
        {
            ReferenceField field = (ReferenceField)this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_INFO_TYPE_ID);
            field.setValue(field.getReferenceRecord(this).getIDFromCode(MessageInfoType.REQUEST));
            field = (ReferenceField)this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_TYPE_ID);
            field.setValue(field.getReferenceRecord(this).getIDFromCode(MessageType.MESSAGE_OUT));
            field = (ReferenceField)this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_STATUS_ID);
            field.setValue(field.getReferenceRecord(this).getIDFromCode(MessageStatus.SENT));
        }
        
        this.getMainRecord().getKeyArea().setKeyOrder(DBConstants.DESCENDING);
        
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.REFERENCE_ID), this.getScreenRecord().getField(MessageLogScreenRecord.REFERENCE_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.REFERENCE_ID).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.REFERENCE_TYPE), this.getScreenRecord().getField(MessageLogScreenRecord.REFERENCE_TYPE), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.REFERENCE_TYPE).addListener(new FieldReSelectHandler(this));
        
        this.getScreenRecord().getField(MessageLogScreenRecord.CONTACT_ID).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.MESSAGE_INFO_TYPE_ID), this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_INFO_TYPE_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_INFO_TYPE_ID).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.MESSAGE_TYPE_ID), this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_TYPE_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_TYPE_ID).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.MESSAGE_STATUS_ID), this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_STATUS_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_STATUS_ID).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.MESSAGE_TRANSPORT_ID), this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_TRANSPORT_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.MESSAGE_TRANSPORT_ID).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.USER_ID), this.getScreenRecord().getField(MessageLogScreenRecord.USER_ID), DBConstants.EQUALS, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.USER_ID).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.MESSAGE_TIME), this.getScreenRecord().getField(MessageLogScreenRecord.START_DATE), CompareFileFilter.GREATER_THAN_EQUAL, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.START_DATE).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(MessageLog.MESSAGE_TIME), this.getScreenRecord().getField(MessageLogScreenRecord.END_DATE), CompareFileFilter.LESS_THAN_EQUAL, null, true));
        this.getScreenRecord().getField(MessageLogScreenRecord.END_DATE).addListener(new FieldReSelectHandler(this));
        
        this.setEditing(false);
    }
853683
public void addMasterListeners()
    {
        super.addMasterListeners();
        
        this.getField(ClassProject.PACKAGE_NAME).addListener(new MoveOnChangeHandler(this.getField(ClassProject.INTERFACE_PACKAGE), null, false, true)
        {
            public int moveSourceToDest(boolean bDisplayOption, int iMoveMode)
            {
                String packageName = (getRecordOwner().getRecord(ProgramControl.PROGRAM_CONTROL_FILE) == null) ? "" : getRecordOwner().getRecord(ProgramControl.PROGRAM_CONTROL_FILE).getField(ProgramControl.INTERFACE_PACKAGE).toString();
                if (packageName.startsWith("."))
                    return m_fldDest.setString(m_fldSource.getString() + packageName, bDisplayOption, iMoveMode);   // Move dependent field to here
                else
                    return super.moveSourceToDest(bDisplayOption, iMoveMode);
            }            
        });
        this.getField(ClassProject.PACKAGE_NAME).addListener(new MoveOnChangeHandler(this.getField(ClassProject.THIN_PACKAGE), null, false, true)
        {
            public int moveSourceToDest(boolean bDisplayOption, int iMoveMode)
            {
                String packageName = (getRecordOwner().getRecord(ProgramControl.PROGRAM_CONTROL_FILE) == null) ? "" : getRecordOwner().getRecord(ProgramControl.PROGRAM_CONTROL_FILE).getField(ProgramControl.THIN_PACKAGE).toString();
                if (packageName.startsWith("."))
                    return m_fldDest.setString(m_fldSource.getString() + packageName, bDisplayOption, iMoveMode);   // Move dependent field to here
                else
                    return super.moveSourceToDest(bDisplayOption, iMoveMode);
            }            
        });
        this.getField(ClassProject.PACKAGE_NAME).addListener(new MoveOnChangeHandler(this.getField(ClassProject.RESOURCE_PACKAGE), null, false, true)
        {
            public int moveSourceToDest(boolean bDisplayOption, int iMoveMode)
            {
                String packageName = (getRecordOwner().getRecord(ProgramControl.PROGRAM_CONTROL_FILE) == null) ? "" : getRecordOwner().getRecord(ProgramControl.PROGRAM_CONTROL_FILE).getField(ProgramControl.RESOURCE_PACKAGE).toString();
                if (packageName.startsWith("."))
                    return m_fldDest.setString(m_fldSource.getString() + packageName, bDisplayOption, iMoveMode);   // Move dependent field to here
                else
                    return super.moveSourceToDest(bDisplayOption, iMoveMode);
            }            
        });
        
        this.getField(ClassProject.PROJECT_PATH).addListener(new MoveOnChangeHandler(this.getField(ClassProject.INTERFACE_PROJECT_PATH), null, false, true));
        this.getField(ClassProject.PROJECT_PATH).addListener(new MoveOnChangeHandler(this.getField(ClassProject.THIN_PROJECT_PATH), null, false, true));
        this.getField(ClassProject.PROJECT_PATH).addListener(new MoveOnChangeHandler(this.getField(ClassProject.RES_PROJECT_PATH), null, false, true));
    }
109220
def add_listener(self, listener, message_type, data=None, one_shot=False):
        """"""
        lst = self._one_shots if one_shot else self._listeners

        if message_type not in lst:
            lst[message_type] = []

        lst[message_type].append(Listener(listener, data))
246357
public void addMasterListeners()
    {
        super.addMasterListeners();
        this.getField(FileHdr.FILE_NAME).addListener(new MoveOnChangeHandler(this.getField(FileHdr.FILE_MAIN_FILENAME), null, false, true));
    }
901773
public void addPropertyListeners()
    {
        this.addPropertiesFieldBehavior(this.getField(MessageDetail.DESTINATION_SITE), TrxMessageHeader.DESTINATION_PARAM);
        this.addPropertiesFieldBehavior(this.getField(MessageDetail.DESTINATION_PATH), TrxMessageHeader.DESTINATION_MESSAGE_PARAM);
        this.addPropertiesFieldBehavior(this.getField(MessageDetail.RETURN_SITE), TrxMessageHeader.SOURCE_PARAM);
        this.addPropertiesFieldBehavior(this.getField(MessageDetail.RETURN_PATH), TrxMessageHeader.SOURCE_MESSAGE_PARAM);
        this.addPropertiesFieldBehavior(this.getField(MessageDetail.XSLT_DOCUMENT), TrxMessageHeader.XSLT_DOCUMENT);
        this.addPropertiesFieldBehavior(this.getField(MessageDetail.INITIAL_MANUAL_TRANSPORT_STATUS_ID), MessageTransport.INITIAL_MESSAGE_DATA_STATUS); 
        this.addPropertiesFieldBehavior(this.getField(MessageDetail.DEFAULT_MESSAGE_VERSION_ID), TrxMessageHeader.MESSAGE_VERSION_ID);
    }
1075570
public void addListener(FileChangeListener fileChangeListener) {
		Assert.notNull(fileChangeListener, "FileChangeListener must not be null");
		synchronized (this.monitor) {
			checkNotStarted();
			this.listeners.add(fileChangeListener);
		}
	}
744803
public void addListeners()
    {
        super.addListeners();
        this.getMainRecord().getField(Registration.RESOURCE_ID).addListener(new ReadSecondaryHandler(this.getRecord(Resource.RESOURCE_FILE)));
    }
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();
    }
110471
function _addListeners() {
        // Avoid adding duplicate listeners - e.g. if a 2nd search is run without closing the old results panel first
        _removeListeners();

        DocumentModule.on("documentChange", _documentChangeHandler);
        FileSystem.on("change", _debouncedFileSystemChangeHandler);
        DocumentManager.on("fileNameChange",  _fileNameChangeHandler);
    }
1229521
public void addListeners()
    {
        super.addListeners();
        Record record = this.getMainRecord();
        Record recClassInfo = this.getRecord(ClassInfo.CLASS_INFO_FILE);
        if (recClassInfo != null)
        {
            record.setKeyArea(KeyInfo.KEY_FILENAME_KEY);
            SubFileFilter listener = new SubFileFilter(recClassInfo.getField(ClassInfo.CLASS_NAME), KeyInfo.KEY_FILENAME, null, null, null, null, true);
            record.addListener(listener);
            recClassInfo.getField(ClassInfo.CLASS_NAME).addListener(new FieldReSelectHandler(this));
        }
    }
1337077
protected void notifyListeners() {
		Iterator it = listeners.iterator();
		while (it.hasNext()) {
			((ComponentListener) it.next()).componentActivated(this);
		}
	}
383802
public void addListeners()
    {
        super.addListeners();
        this.getMainRecord().getField(Issue.PROJECT_ID).addListener(new InitFieldHandler(this.getRecord(IssueControl.ISSUE_CONTROL_FILE).getField(IssueControl.PROJECT_ID)));
        this.getMainRecord().getField(Issue.PROJECT_VERSION_ID).addListener(new InitFieldHandler(this.getRecord(IssueControl.ISSUE_CONTROL_FILE).getField(IssueControl.PROJECT_VERSION_ID)));
        this.getMainRecord().getField(Issue.ISSUE_TYPE_ID).addListener(new InitFieldHandler(this.getRecord(IssueControl.ISSUE_CONTROL_FILE).getField(IssueControl.ISSUE_TYPE_ID)));
        this.getMainRecord().getField(Issue.ISSUE_STATUS_ID).addListener(new InitFieldHandler(this.getRecord(IssueControl.ISSUE_CONTROL_FILE).getField(IssueControl.ISSUE_STATUS_ID)));
        this.getMainRecord().getField(Issue.ISSUE_PRIORITY_ID).addListener(new InitFieldHandler(this.getRecord(IssueControl.ISSUE_CONTROL_FILE).getField(IssueControl.ISSUE_PRIORITY_ID)));
    }
786996
protected function registerListeners()
    {
        $this->process->getDispatcher()->addListener(LogEvent::EVENT_NAME, function (LogEvent $event) {
            $this->data = $event->toArray();
            $this->stream();
        });
    }
1005611
public void addListeners()
    {
        this.getRecord(UserInfo.USER_INFO_FILE).getField(UserInfo.USER_NAME).setEnabled(false);
        this.readCurrentUser();
        
        super.addListeners();
        
        this.getMainRecord().addListener(new UserPasswordHandler(true));
    }
774048
public void addListeners()
    {
        super.addListeners();
        // This is all temporary. It will be much better to display the resources next to the EY for each record
        this.getScreenRecord().getField(ResourceScreenRecord.LANGUAGE).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(Registration.LANGUAGE, this.getScreenRecord().getField(ResourceScreenRecord.LANGUAGE), DBConstants.EQUALS, null, false));
        this.getMainRecord().getField(Registration.LANGUAGE).addListener(new InitFieldHandler(this.getScreenRecord().getField(ResourceScreenRecord.LANGUAGE)));
        this.getScreenRecord().getField(ResourceScreenRecord.LOCALE).addListener(new FieldReSelectHandler(this));
        this.getMainRecord().addListener(new CompareFileFilter(Registration.LOCALE, this.getScreenRecord().getField(ResourceScreenRecord.LOCALE), DBConstants.EQUALS, null, false));
        this.getMainRecord().getField(Registration.LOCALE).addListener(new InitFieldHandler(this.getScreenRecord().getField(ResourceScreenRecord.LOCALE)));
        
        this.getMainRecord().getField(Registration.CODE).addListener(new InitFieldHandler(this.getHeaderRecord().getField(Resource.CODE)));
    }
151260
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);
            recClassInfo.getField(ClassInfo.CLASS_NAME).addListener(new FieldReSelectHandler(this));
        }
    }
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));
        }
    }