Called when a valid record is read from the table/query.
This method calls doValidRecord for all the listeners, and handleFieldChange(read) for all the fields.
@param bDisplayOption Display the fields on the screen?
190137
public void handleValidRecord(boolean bDisplayOption)               // init this field override for other value
    {
        // Now, Notify all the fields that they have new data 
        int iFieldSeq;
        BaseField field = null;
        int iLastField = this.getFieldCount() + DBConstants.MAIN_FIELD - 1;   // Are these lines really needed?

        for (iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq <= iLastField; ++iFieldSeq)
        {
            field = this.getField(iFieldSeq);
            field.handleFieldChanged(bDisplayOption, DBConstants.READ_MOVE);        // Do BaseField Changed Behaviors
        }
        BaseListener nextListener = this.getNextEnabledListener();
        while (nextListener != null)
        {
            boolean bOldState = nextListener.setEnabledListener(false);  // Don't allow it to be called again
            ((FileListener)nextListener).doValidRecord(bDisplayOption);
            nextListener.setEnabledListener(bOldState);
            nextListener = nextListener.getNextEnabledListener();
        }
        this.doValidRecord(bDisplayOption);
        
        for (iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq <= iLastField; ++iFieldSeq)
        {
            field = this.getField(iFieldSeq);
            field.setModified(false);   // At this point, no changes have been done
            if (bDisplayOption)
                field.displayField();   // Display this field
        }
    }
1326073
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode)
    {
        if (m_strTargetValue != null)
        {
            String fieldString = this.getString();
            if (m_boolMaskValue.booleanValue())
            {
                int index = fieldString.indexOf(m_strTargetValue);
                if (bState == m_bTrueIfMatch)
                {   // Add target string to field!
                    if (index == -1) // Is the target value in the field string?
                    {   // No, Add it!
                        fieldString = m_strTargetValue + fieldString;        // Add the field to the string
                    }
                }
                else
                {   // Take target field out of field
                    if (index != -1)    // Is the target value in the field string
                    {   // Yes, Take it out!
                        fieldString = fieldString.substring(0, index) + fieldString.substring(index+1);   // Strip the field to the string
                    }
                }
            }
            else
                fieldString = m_strTargetValue; // Set to the value
            return this.setString(fieldString, bDisplayOption, iMoveMode);
        }
        else if (m_fldTargetValue != null)
        {
            if (bState == m_bTrueIfMatch)
            	return ((BaseField)this.getField()).moveFieldToThis(m_fldTargetValue, bDisplayOption, iMoveMode);
            else
                return ((BaseField)this.getField()).setString(null);	// Unchecked = clear it.
        }
        else    // Target = null
        {
            if (bState == m_bTrueIfMatch)
                return ((BaseField)this.getField()).setString(null);
            else
                return DBConstants.NORMAL_RETURN; //?
        }
    }
703689
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        if (m_bWaiting)
        {
            synchronized (this)
            {
                m_bWaiting = false;
                this.notify();
            }
        }
        return super.fieldChanged(bDisplayOption, iMoveMode);
    }
503952
public void doValidRecord(boolean bDisplayOption)
    {
        m_iOriginalMessageTransportID = (int)this.getOwner().getField(MessageDetail.MESSAGE_TRANSPORT_ID).getValue();
        m_iOriginalDefaultMessageTransportID = (int)this.getOwner().getField(MessageDetail.DEFAULT_MESSAGE_TRANSPORT_ID).getValue();
        super.doValidRecord(bDisplayOption);
    }
282238
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        UserField field = (UserField)this.getOwner();
        Person recPerson = (Person)field.getRecord();
        if (field.isNull())
        {
            
        }
        else
        {
            ContactTypeModel recContactType = (ContactTypeModel)this.getContactType(recPerson);
            if (recContactType != null)
            {   // Always
                UserInfo recUserInfo = (UserInfo)field.getReference();
                if (recUserInfo != null)
                    if ((recUserInfo.getEditMode() == DBConstants.EDIT_CURRENT) || (recUserInfo.getEditMode() == DBConstants.EDIT_IN_PROGRESS))
                    {
                        recUserInfo.addPropertyListeners();
                        int iOldOpenMode = recUserInfo.setOpenMode(recUserInfo.getOpenMode() & ~DBConstants.OPEN_READ_ONLY);
                        try {
                            recUserInfo.edit();
                            recUserInfo.getField(UserInfo.CONTACT_TYPE_ID).moveFieldToThis(((Record)recContactType).getCounterField());
                            recUserInfo.getField(UserInfo.CONTACT_ID).moveFieldToThis(recPerson.getCounterField());
                            recUserInfo.set();
                        } catch (DBException ex) {
                            ex.printStackTrace();
                        } finally {
                            recUserInfo.setOpenMode(iOldOpenMode);
                        }
                    }
            }
        }
        return super.fieldChanged(bDisplayOption, iMoveMode);
    }
405998
public int initField(boolean bDisplayOption)                    // Init this field override for other value
    {
        if ((this.getDefault() == null) || (this.getDefault() instanceof String))
            return this.setString((String)this.getDefault(), bDisplayOption, Constants.INIT_MOVE);   // zero out the field
        return this.setData(this.getDefault(), bDisplayOption, Constants.INIT_MOVE);
    }
550449
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
    	if (iMoveMode != DBConstants.SCREEN_MOVE)	// This is necessary if an override change the repondsTo.
    	    // Also, if just refreshing the record, don't change this if set
    	    if ((m_bChangeDataOnRefresh) || ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) != DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE))
    	        if ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_UPDATE_LAST_READ) != DBConstants.OPEN_DONT_UPDATE_LAST_READ)    // This is a special case where I want a subsequent write to get an error if changed 
    	            this.setOriginalData(this.getOwner().getData());
    	return super.fieldChanged(bDisplayOption, iMoveMode);
    }
154211
public void doValidRecord(boolean bDisplayOption)
    {
        if (m_fldMain == null)
            m_fldMain = this.getOwner().getField(mainFieldName);
        if (m_fldMain == null)
            return;     // Error - Field not found?
        if (fileKeyFieldName != null)
            m_FileToRead.getField(fileKeyFieldName).moveFieldToThis(m_fldMain, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);  // SCREEN_MOVE says this is coming from here
        else
            m_FileToRead.getField(m_iFileKeyField).moveFieldToThis(m_fldMain, DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);  // SCREEN_MOVE says this is coming from here
        try   {
            boolean bSuccess = m_FileToRead.seek("=");
            if (!bSuccess)
            {
                m_FileToRead.initRecord(bDisplayOption);    // Put's record in an indeterminate state (so this record won't be written) and clears the fields.
                BaseField nextField = m_FileToRead.getField(m_FileToRead.getDefaultDisplayFieldName());
                String strRecNotFound = this.getOwner().getTable().getString(RECORD_NOT_FOUND_MESSAGE);
                if (nextField instanceof StringField)
                    nextField.setString(strRecNotFound, bDisplayOption, DBConstants.SCREEN_MOVE);
            }
        } catch (DBException ex)    {
            ex.printStackTrace();
        }
        super.doValidRecord(bDisplayOption);
    }
1285318
public int setValue(double value, boolean bDisplayOption, int moveMode)
    {           // Set this field's value
        Short tempshort = new Short((short)value);
        int errorCode = this.setData(tempshort, bDisplayOption, moveMode);
        return errorCode;
    }
1328758
public int convertIndexToField(int index, boolean bDisplayOption, int iMoveMode)
    {   // User selected an item... Read it in!
        int iErrorCode = this.moveToIndex(index);
        if (iErrorCode == DBConstants.NORMAL_RETURN)
            m_record.handleRecordChange(null, DBConstants.SELECT_TYPE, bDisplayOption);   // Record selected!!!
        // These next lines causes the FieldBehaviors with SCREEN_MOVE to be executed!!!
        FieldInfo field = this.getField();
        if (iErrorCode == DBConstants.NORMAL_RETURN) if (field != null)
        {
            if (field instanceof ReferenceField)
                ((ReferenceField)field).setReference(m_record, bDisplayOption, iMoveMode);
            else if (field instanceof StringField)
            {
                {
                    if (displayFieldName != null)
                        return field.setString(m_record.getField(displayFieldName).toString());
                    else
                        return field.setString(m_record.getField(m_iFieldSeq).toString());
                }
            }
        }
        return iErrorCode;
    }
316453
public void init(Record record, ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String,Object> properties)
    {
        if (record == null)
            if (parentScreen.getRecord(ClassInfo.CLASS_INFO_FILE) != null)
        {
            iDisplayFieldDesc = iDisplayFieldDesc | ScreenConstants.DETAIL_MODE;
            record = parentScreen.getRecord(ClassInfo.CLASS_INFO_FILE); // Header record
        }
        super.init(record, itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties);
    }
1115979
public int setValue(double value, boolean bDisplayOption, int iMoveMode)
    {           // Set this field's value
        java.util.Date dateTemp = new java.util.Date((long)value);
        int iErrorCode = this.setData(dateTemp, bDisplayOption, iMoveMode);
        return iErrorCode;
    }
249425
public int setData(Object state, boolean bDisplayOption, int iMoveMode)
    {       // Must be overidden
        if (this.getNextConverter() != null)
            return this.getNextConverter().setData(state, bDisplayOption, iMoveMode);
        else
            return super.setData(state, bDisplayOption, iMoveMode);
    }
1348914
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        int iErrorCode = DBConstants.NORMAL_RETURN;
        Record record = this.getOwner().getRecord();
        if (record != null)
        {
            try   {
                Object varBookmark = null;
                if (record.getEditMode() == DBConstants.EDIT_IN_PROGRESS)
                { // Update the record
                    if (m_bRefreshAfterWrite)
                        varBookmark = record.getHandle(DBConstants.DATA_SOURCE_HANDLE);
                    record.set();
                }
                else if (record.getEditMode() == DBConstants.EDIT_ADD)
                {
                    record.add();
                    if (m_bRefreshAfterWrite)
                        varBookmark = record.getLastModified(DBConstants.DATA_SOURCE_HANDLE);
                }
                if (varBookmark != null)
                {
                    record.setHandle(varBookmark, DBConstants.DATA_SOURCE_HANDLE);
                    record.edit();
                }
            } catch (DBException ex)    {
                ex.printStackTrace();
                iErrorCode = ex.getErrorCode();
            }
        }
        return iErrorCode;
    }
23639
public int moveSourceToDest(boolean bDisplayOption, int iMoveMode)
    {
        if (m_objValue instanceof String)
            return m_fldDest.setString((String)m_objValue, bDisplayOption, iMoveMode);
        else
            return m_fldDest.setData(m_objValue, bDisplayOption, iMoveMode);
    }
627539
void onDataSetLookupChanged(@Observes DataSetLookupChangedEvent event) {
        DataSetLookup dataSetLookup = event.getDataSetLookup();
        displayerSettings.setDataSet(null);
        displayerSettings.setDataSetLookup(dataSetLookup);
        removeStaleSettings();
        initDisplayer();
        initSettingsEditor();
        showDisplayer();
    }
4474
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        int result = DBConstants.NORMAL_RETURN;
        Record record = m_fldTarget.getRecord();
        boolean bSetDirty = true;
        if (m_bIfNewRecord) if (record.getEditMode() == Constants.EDIT_ADD)
            bSetDirty = true;
        if (m_bIfCurrentRecord) if ((record.getEditMode() == Constants.EDIT_CURRENT) || (record.getEditMode() == Constants.EDIT_IN_PROGRESS))
            bSetDirty = true;
        if (bSetDirty)
        {
            m_fldTarget.setModified(true);
            result = record.handleRecordChange(m_fldTarget, DBConstants.FIELD_CHANGED_TYPE, bDisplayOption);    // Tell table that I'm getting changed (if not locked)
        }
        return result;
    }