Set the field that owns this listener.
@owner The field that this listener is being added to (if null, this listener is being removed).
552918
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
            this.fieldChanged(DBConstants.DONT_DISPLAY, DBConstants.INIT_MOVE);
    }
626094
public void addListener(BaseListener listener)
    {
        listener.setNextListener(null);  // Just being safe
        if ((this.getRecord() != null) && (this.getRecord().getTable() != null))
            this.getRecord().getTable().addListener((FieldListener)listener, this);   // Give the table a chance to clone this or whatever.
        else
            this.doAddListener((FieldListener)listener);
    }
306036
public void addGetFieldIntercept(String owner, String name) {

    if (isLog(4)) {
      log("change getfield " + owner + " name:" + name);
    }
    typeQueryUser = true;
  }
746047
public void addOwner(String owner) {
        if (this.owners == null) {
            this.owners = new Hashtable<String, String>();
        }
        this.owners.put(owner, owner);
    }
1092714
public void setListener(Listener listener) {
        if (null != listener) {
            listenerReference = new WeakReference<Listener>(listener);
        } else {
            listenerReference = null;
        }
    }
893635
public boolean syncClonedListener(BaseField field, FieldListener listener, boolean bInitCalled)
    {
        if (!bInitCalled)
        {
            BaseField fldSource = this.getSyncedListenersField(m_fldSource, listener);
            ((InitFieldHandler)listener).init(null, fldSource, m_objSource, m_bInitIfSourceNull, m_bOnlyInitIfDestNull);
        }
        return super.syncClonedListener(field, listener, true);
    }
17205
public static void setValue(Field field, Object self, Object value) {
        try {
            field.set(self, value);
        } catch (IllegalAccessException e) {
            throw ShedException.wrap(e, ShedErrorCode.UNABLE_TO_SET_FIELD)
                    .put("field", field.toGenericString());
        }
    }
96462
public void addListener(ISUPListener listener) {
        if (listener == null) {
            throw new NullPointerException("Listener must not be null!");
        }
        if (this.listeners.contains(listener)) {
            throw new IllegalArgumentException("Listener already present: " + listener + " !");
        } else {
            this.listeners.add(listener);
        }

    }
368700
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            this.setupGridOrder();      // Set the initial grid order
            if (m_gridScreen != null)
            {
                m_gridScreen.setConverter(this.getOwner());   // The grid screen will automatically change this field to match the key order.
                this.getOwner().addComponent(m_gridScreen);
            }
        }
    }
62452
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (m_recordToUpdate == null)
            m_recordToUpdate = this.getOwner();   // Defaults to this file
        if (owner != null) if (this.getOwner() != m_recordToUpdate)
            m_recordToUpdate.addListener(new FileRemoveBOnCloseHandler(this));
        if (m_recordToUpdate != null)
            m_recordToUpdate.setOpenMode((m_recordToUpdate.getOpenMode() | DBConstants.OPEN_LOCK_ON_CHANGE_STRATEGY) & ~(DBConstants.OPEN_READ_ONLY | DBConstants.OPEN_APPEND_ONLY));   // Lock the record if any changes
        if (owner != null)
            if (this.getOwner() == m_recordToUpdate)
                if (this.getOwner().getListener() != this)  // Prevents endless loop (listener is already the first in the list)
        {   // This is special weird logic - This must be the first in the listener list
            this.getOwner().removeListener(this, false);
            super.setOwner(owner);  // Set it back
            this.setNextListener(this.getOwner().getListener());
            this.getOwner().setListener(this);  // This MUST be the first listener on the list.
        }
    }
482365
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner == null)
            return;
        if ((m_strFieldNameToCheck != null)
            && (m_strFieldNameToCheck.length() > 0))
            if ((m_fldToCheck == null)
                || (m_fldToCheck.getFieldName() == null)
                || (m_fldToCheck.getFieldName().length() == 0))
                    m_fldToCheck = this.getOwner().getField(m_strFieldNameToCheck); // If you have the fieldname, but not the field, get the field.
        if (m_fldToCompare != null) if (m_fldToCompare.getRecord() != this.getOwner())
            m_fldToCompare.addListener(new FieldRemoveBOnCloseHandler(this));
        if (m_fldToCheck != null) if (m_fldToCheck.getRecord() != this.getOwner())  // If field is not in this file, remember to remove it
            m_fldToCheck.addListener(new FieldRemoveBOnCloseHandler(this));
//x        this.getOwner().close();    // Must requery after setting dependent fields!
    }
757115
public void init(BaseField owner)
    {
        m_bScreenMove = true;
        m_bInitMove = true;
        m_bReadMove = true;
        super.init(owner);
    }
1364947
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null) if (this.getOwner().getState() == false)
            m_mergeRecord.getTable().removeTable(m_subRecord.getTable()); // If this is off initially, take the table out of the loop
    }
635385
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null) if (m_recordToSync != null)
            m_recordToSync.addListener(new FileRemoveBOnCloseHandler(this));
    }
1359697
function init(owner, field, layout, val, children) {  // {{{2
/**
 * Field wrapper constructor
 *
 * @param owner {Object} Owning wrap list
 * @param field {Object} Field description object
 * @param layout {Object} Layout
 * @param val {*} Field value
 *
 * @method constructor
 */

  this.owner = owner;
  owner.fields.push(this);

  this.field = field;
  this.value = val;

  if (layout) this.layout = layout;
  if (children) this.children = children;
}
537423
public void init(ListenerOwner owner)
    {
        m_owner = owner;
        m_nextListener = null;
        m_bEnabled = true;
        m_dependentListener = null;
        m_dependentStateListener = null;
        if (owner != null)
            owner.addListener(this);
    }
830059
protected void initIndexPersistableListener() {
        _index.setPersistableListener(new PersistableListener() {
            @Override
            public void beforePersist() {
                try {
                    PersistableListener l = _listener;
                    if(l != null) l.beforePersist();
                } catch (Exception e) {
                    _logger.error("failed on calling beforePersist", e);
                }
                
                try {
                    _bytesDB.persist();
                } catch (Exception e) {
                    _logger.error("failed on calling beforePersist", e);
                }
            }
            
            @Override
            public void afterPersist() {
                try {
                    PersistableListener l = _listener;
                    if(l != null) l.afterPersist();
                } catch(Exception e) {
                    _logger.error("failed on calling afterPersist", e);
                }
            }
        });
    }