torso-bundle.js
function() {
      if (!_.isUndefined(this.ids.property)) {
        this.stopListeningToIdsPropertyChangeEvent();
        var idsPropertyNameAndContext = this.__parseIdsPropertyNameAndIdContainer();
        var idContainer = idsPropertyNameAndContext.idContainer;
        var canListenToEvents = idContainer && _.isFunction(idContainer.on);
        if (canListenToEvents) {
          this.__currentContextWithListener = idContainer;
          this.__currentContextEventName = 'change:' + idsPropertyNameAndContext.idsPropertyName;
          this.listenTo(this.__currentContextWithListener, this.__currentContextEventName, this.retrieve);
          this.listenTo(this.__currentContextWithListener, 'fetched:ids', this.retrieve);
        }
      }
    }
function() {
      if (!_.isUndefined(this.ids.property)) {
        this.stopListeningToIdsPropertyChangeEvent();
        var idsPropertyNameAndContext = this.__parseIdsPropertyNameAndIdContainer();
        var idContainer = idsPropertyNameAndContext.idContainer;
        var canListenToEvents = idContainer && _.isFunction(idContainer.on);
        if (canListenToEvents) {
          this.__currentContextWithListener = idContainer;
          this.__currentContextEventName = 'change:' + idsPropertyNameAndContext.idsPropertyName;
          this.listenTo(this.__currentContextWithListener, this.__currentContextEventName, this.retrieve);
          this.listenTo(this.__currentContextWithListener, 'fetched:ids', this.retrieve);
        }
      }
    }
function ( ) { if ( ! _ . isUndefined ( this . ids . property ) ) { this . stopListeningToIdsPropertyChangeEvent ( ) ; var idsPropertyNameAndContext = this . __parseIdsPropertyNameAndIdContainer ( ) ; var idContainer = idsPropertyNameAndContext . idContainer ; var canListenToEvents = idContainer && _ . isFunction ( idContainer . on ) ; if ( canListenToEvents ) { this . __currentContextWithListener = idContainer ; this . __currentContextEventName = 'change:' + idsPropertyNameAndContext . idsPropertyName ; this . listenTo ( this . __currentContextWithListener , this . __currentContextEventName , this . retrieve ) ; this . listenTo ( this . __currentContextWithListener , 'fetched:ids' , this . retrieve ) ; } } }
Listens for the change event on the ids property and, if triggered, re-fetches the data based on the new ids.
@method listenToIdsPropertyChangeEvent
Listens for the change event on the ids property and if triggered re - fetches the data based on the new ids .