javascript - How do I pass a view to another Backbone view? -


i trying create base table class in backbone. each subclass row have different look. want pass in view of row. trying add attribute set in child class, keep getting , error typeerror: cannot read property '_listenerid' of undefined. here parent class:

  var basetableview = baseview.extend({     template: null,     rowview: null,     initialize: function() {         ...     }   }); 

here child class set row view up:

  var peoplecollectionview = basetableview.extend({      initialize: function() {       this.collection = new peoplecollection();       this.template = peopletemplate;       this.itemview = personview;       basetableview.prototype.initialize.apply(this, arguments);     }   }); 

when go use personview in super class, use this:

var view = new this.rowview({   model: item }); 

that when above stated error typeerror: cannot read property '_listenerid' of undefined. how can fix this, or if should set hierarchy different, how should done? help.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -