public void setOwner ( ListenerOwner owner ) { super . setOwner ( owner ) ; if ( owner != null ) if ( m_recordToSync != null ) { if ( ! m_recordToSync . getBaseRecord ( ) . getTableNames ( false ) . equals ( this . getOwner ( ) . getBaseRecord ( ) . getTableNames ( false ) ) ) { // Must be the same base tables! m_recordToSync = null ; return ; } m_recordToSync . addListener ( new FileRemoveBOnCloseHandler ( this ) ) ; } }
Set the field or file that owns this listener . I Check to make sure that the base tables are the same first .