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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:28:04+00:00 2026-05-27T15:28:04+00:00

When my chartModel changes I want to update the globalModel. chartModel.bind(change, updateGlobalModel); updateGlobalModel(){ globalModel.set(obj)

  • 0

When my “chartModel” changes I want to update the “globalModel”.

chartModel.bind("change", updateGlobalModel);

updateGlobalModel(){
  globalModel.set(obj)
}

And vice versa, I want my chartModel to update when the globalModel changes.

globalModel.bind("change", updateChartModel);

updateChartModel(){
  chartModel.set(obj)
}

This results in a feedback loop when setting the globalModel. I could prevent this by setting {silent:true}.

But here comes the problem. I have another Model that is dependent on the change event:

globalModel.bind("change", updateOtherModel);

How can I alert this model of the change but not the former one (to avoid the feedback loop)?

UPDATE:
For now, I decided to generate a specific ID for each set call:

set : function(attrs, options) { 
        if(!("setID" in attrs)){
            attrs.setID = myApp.utils.uniqueID(); //newDate.getTime();
        }
        Backbone.Model.prototype.set.call(this, attrs, options);
    },

This way, I can always generate a “setID” attribute from anywhere in my application. If the setID is still the same when fetching something from the model, I know there could be risk for a feedback loop.

  • 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-05-27T15:28:04+00:00Added an answer on May 27, 2026 at 3:28 pm

    My knowledge is limited, so maybe I shouldn’t be answering, but I would try to pass a reference to chartModel when it’s created that refers to the “other” model that you want updated. Then trigger an event on updateChartModel() and make sure your “other” model is bound on that event.

    The question I have is: does the silent object mute all events? Or just model related ones? This obviously wouldn’t work if all events are muted.

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

Sidebar

Related Questions

Hello i have this following function: ... var model = $(#carModel); .... model.change(validModel); function
I want to create a component which can be used like: <mc:chart data=#{bean.data} width=200
I'm sure this has been asked but I can't quite find the right search
and first off thanks for your time to look at this. For a research
I have Dropdown and on click of a button, I want to display data
I'm losing data-bind when initiating a printing process, is that possible ? Thats what
for ($x = 1; $x <= $num; $x++) { $userArray[] = $this->input->post(select . $x
Controller for ($x = 1; $x <= $numb; $x++) { echo $quanoutput = $this->input->post('quanoutput');
There's an XML scheme which says something like this: <ExtraFields> <ExtraField Type=Int> <Key>Mileage</Key> <Value>500000
I have something like this in my website: <body> <div id=1> content1 </div> <div

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.