Closed jSanchoDev closed 10 years ago
Is this with or without models in the collection?
With models.
hi @SanchoPoncho
I have written a fiddle to try and reproduce.. However everything seems correct. http://jsfiddle.net/F59qp/11/
Click one of the headlines and look at the console.
hi @samccone !
Somehow I've managed to break your fiddle too) here: http://jsfiddle.net/F59qp/21/ I've edited it to be more like mine, and now it failed me in initialize ((
BTW, thanks a lot for creating a fiddle!
You are overriding render! that is the root of your problem. IF you stop overriding render everything will work just fine :)
Thanks, now I've got it. Hmm, then is it possible to render the view from template inside script tag?
yep getTemplate: function(){...return template here....}
PS there are plenty of people here if you have questions https://gitter.im/marionettejs/backbone.marionette
Thanks a lot, once again!)
Inside an ItemView, when binding events via events object, this references the HTML object.:
The workaraound I use is, in onShow function:
But it all seems strange. CollectionView is inside LayoutView, which is inside another LayoutView.
EDIT: To make things worse (or better)): after editing all events to the above workaround, I've tried to switch to events: {} -way again. And now it works! This is the second time I'm having this circle of things, I already had such an issue with another view. Maybe this has something to do with Mozilla Firefox caching/JS engine/whatever, rather than Marionette. Now, with the same code I've posted here, callbacks give me the View object as this.