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 8912763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:17:17+00:00 2026-06-15T04:17:17+00:00

After calling collection.fetch({ add: true }) on a Backbone collection, I’d like to trigger

  • 0

After calling collection.fetch({ add: true }) on a Backbone collection, I’d like to trigger an event once the view of the updated collection has finished rendering.

The “collection view” has an “add” method, which generates an “item view” for each new item in the collection, calls “render” on that view, and adds it to the collection view.

Is there a way to trigger an event when fetching a collection has finished, and all items have been added and rendered?

  • 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-15T04:17:18+00:00Added an answer on June 15, 2026 at 4:17 am

    The fetch method on collections takes a success parameter:

    fetch collection.fetch([options])

    […] The options hash takes success and error callbacks which will be passed (collection, response, options) and (collection, xhr, options) as arguments, respectively.

    The success callback will be called after the collection has been updated so it will be called after all the "add" events have been triggered and dealt with. So you could do this:

    collection.fetch({
        success: function(collection, response, options) {
            collection.trigger('fetched_and_notified');
        }
    });
    

    and anyone that cares could collection.on('fetched_and_notified', ...) to listen for such an event. If you wanted, you could provide your own fetch implementation to trigger this event automatically, something like this:

    fetch: function(options) {
        options = options ? _.clone(options) : { };
    
        var success     = options.success;
        options.success = function(collection, response, options) {
            collection.trigger('fetched_and_notified', collection);
            if(success)
                success(collection, response, options);
        };
        Backbone.Collection.prototype.fetch.call(this, options);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if after calling functions the data I have in
I'm having trouble with models disappearing after populating a Backbone collection from a url.
I'd like to set a model's ID to the correct value after a fetch
There is a 'View' in the model with the event click . After using
I am calling a fetch on a collection and inside its success methods fetching
After calling notifydatasetchanged(); I want to scroll to the bottom of list so that
After calling to a com component procedure , an error raised OLE error C0000094.
After calling msgrcv(), I got a E2BIG: on SunOS, CPP compiler. Output is as
What does the pointer of a dynamically allocated memory points to after calling the
I'm interacting with the Magento API and after calling: $result = $soap->call( $session_id, 'catalog_product.list'

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.