Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8902655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:40:06+00:00 2026-06-15T01:40:06+00:00

In my backbone.Marionette application I have a Model that requires an Id attribute to

  • 0

In my backbone.Marionette application I have a Model that requires an Id attribute to construct it’s url. I therefore create the model by passing it an Id, add it to a view and then fetch the model:

   model = new Model({_id:id})               
   view = new View({model:model})                               
   app.content.show(view)                                                    
   model.fetch()

I would expect the view to only start rendering once the model has been fetched, but Marionette renders the model immediately causing my template rendering to fail as the expected attributes don’t exist. Any workarounds?

I’m trying to do something similar to the accepted answer here:
Binding a Backbone Model to a Marionette ItemView – blocking .fetch()?

But while that works with backbone, as stated in the answer, Marionette automatically renders the view.

Also see:
Backbone Marionette Displaying before fetch complete

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:40:07+00:00Added an answer on June 15, 2026 at 1:40 am

    If you truly want to prevent rendering until the model has been fetched you should reorder your calls like this:

    model = new Model({_id:id});
    view = new View({model:model});
    model.fetch({success: function () {
      app.content.show(view);
    });
    

    Alternatively, you should think about rendering immediately and taking advantage of Marionette’s blank state support.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very simple backbone model and collection. I have a corresponding backbone.marionette.CollectionView and
I have to build a pretty complex application using Backbone Marionette. The user interface
Trying to create a page that allows users to add edit and view a
In backbone it seems that I have to get model attributes via model.get('att_name') I'd
Trying to create a backbone plugin that inherits from Backbone.Model but overrides the sync
I have this code in Coffeescript window.App = new Backbone.Marionette.Application Models: {} Collections: {}
I have complex backbone application with many nested views ( marionette layouts and regions
I have a collection which is rendered by a Backbone Marionette item view. The
In my application i added Marionette.sync plugin and override these methods: Backbone.Marionette.TemplateCache.prototype.loadTemplate = function
I'm using Backbone.Marionette and need to render a view of employees and their respective

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.