JavaScript Preventing Marionette CompositeView render until fetch complete

I'm having a problem where render is being called autimatically in my Marionette CompositeView which is correct, the problem is that I'm fetching collection data in the initialize and want this to be present when the render happens. At the moment I'm running this.render() inside the done method of the fetch which re-renders but this causes problems as now I have 2 views per model. Can anyone recommend how I can properly prevent this initial render or prevent the duplicate views. 1 entry will output view1 and view2.

JS CompositeView

initialize: function() {
            var self = this;

            this.teamsCollection = new TeamsCollection();

            this.teamsCollection.fetch().done(function() {
                self.render();
            });
        },
Answer:1

I am having an issue centring a <div id='divTwo'> inside another <div id='divOne'>. This is normal an easy thing to do, however in this instance i have transform: scale(); with transform-...

I am having an issue centring a <div id='divTwo'> inside another <div id='divOne'>. This is normal an easy thing to do, however in this instance i have transform: scale(); with transform-...

I am using Phonegap and jQuery to develop an app. I have a bit of a bug that has me stumped. I have a back button which looks like this: <div data-role="header"> <a id="...

I am using Phonegap and jQuery to develop an app. I have a bit of a bug that has me stumped. I have a back button which looks like this: <div data-role="header"> <a id="...

I am trying to implement a grid with grouping feature. This is my Model: Model Ext.define('myApp.model.ModelPrueba2', { extend: 'Ext.data.Model', fields: ['id', { name: 'name', type: 'string'...

I am trying to implement a grid with grouping feature. This is my Model: Model Ext.define('myApp.model.ModelPrueba2', { extend: 'Ext.data.Model', fields: ['id', { name: 'name', type: 'string'...

  1. extjs grid grouping multiple columns
  2. extjs grid grouping sort
  3. extjs grid grouping example
  4. extjs grid grouping
  5. extjs grid grouping expand all
  6. extjs grid grouping start collapsed
  7. extjs grid grouping not working
  8. extjs grid grouping collapse all
  9. extjs grid grouping checkbox
  10. extjs grid grouping collapse
  11. extjs grid grouping template
  12. extjs grid grouping tooltip
  13. extjs grid grouping feature
  14. extjs grid grouping column
  15. extjs grid group by multiple fields
  16. extjs grid group header
  17. extjs grid group order
  18. extjs grid group summary
  19. extjs grid group header checkbox
  20. extjs grid grouped column headers

I had an text field where user has to place an url. I need to validate the url whether format is valid.I need to write an reg-exp to find below invalid urls. http://www.google.com//test/index.html //...

I had an text field where user has to place an url. I need to validate the url whether format is valid.I need to write an reg-exp to find below invalid urls. http://www.google.com//test/index.html //...

  1. format validator javascript
  2. validator.js format
  3. validating date format in javascript