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

  • SEARCH
  • Home
  • 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 9300291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:44:53+00:00 2026-06-18T22:44:53+00:00

In my Backbone function, i am fetching the data from server as first time.(it

  • 0

In my Backbone function, i am fetching the data from server as first time.(it has bunch of datas) and i am adding to document. According to the client requirement i should keep watch the server every 10sec, and need to apply the elements to the document. I am always using the “reset” call back to render the elements..

But i need to apply all the element to document as firt time, later part just it is enough to update, how can i do like..?

here is a partial stuff from my code:

initialize:function(params){
            _.bindAll(this);
            var that = this;
            this.listItems = ["projectName","assignedTo","projectName"];
            this.classItems = ["projectName","assignedTo","sortBy"];
            this.listCatch = [];this.boardCatch=[];
            this.params = params;

            for(var i=0;i<this.listItems.length; i+=1){
                this.listCatch[i] = [];
            }

            this.collection = new singleton.collection;
            this.collection.on('reset', this.render);
                    //on load resetting..           
            var dataFetcher = function(){
                that.collection.fetch();
                appDataFetcher = setTimeout(dataFetcher,10000);
                    // as well all times resetting the whole data...
            };
            var appDataFetcher = setTimeout(dataFetcher,0); 
        },
        render:function(){
            this.listCollection = this.collection;
            this.boardCollection = this.collection;
            this.listCollect();
            this.boardViewSet();
        },
        listCollect:function(){
            var that = this;
            _(this.listItems).forEach(function(key,i){
                var uniqur = _.uniq(that.listCollection.models, function(item){
                    return item.get(key);
                });
                that.listViewSet(key,i,uniqur);
            });
        },
  • 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-18T22:44:55+00:00Added an answer on June 18, 2026 at 10:44 pm

    I set my fetching process like this.. it works fine as like i expected. But if this is not correct approach let any one correct me..?

    this.collection.on('add', this.render); 
    this.collection.on('remove', this.render);  
            var dataFetcher = function(){
                that.collection.fetch({update:true,remove:true});
                appDataFetcher = setTimeout(dataFetcher,10000);
            };
     var appDataFetcher = setTimeout(dataFetcher,0);    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using backbone.js and Lithium. I'm fetching a model from the server by passing
(Rails 3 + backbone 0.53) I am fetching data from my API on /payments
I am fetching a mongodb collection from server using backbone collection. Since the ids
First I create some backbone views: (function() { var SomeView = Backbone.View.extend({ ... });
Below is my backbone view. define([ 'app', 'backbone', 'twig', 'templates/report', 'data/reportViewCollection', 'data/reportViewModel' ], function
While fetching quite a large Backbone collection from a REST service with IE8 I
Basically, in Backbone & coffeescript, I'm pulling in tweets from the Twitter API. Fetching
In the backbone.js, for the purpose of filtering the data, i am fetching by
Im using backbone.js to get a collection from the REST server. Fetch triggers fine
The View.remove() function in backbone js removes the container element of the view itself

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.