title: Two way data binding in backbone.js
body: <p>I'm developing a jQuery Backbone.js web application.<br>
  As it is in Adobe Flex, I have implemented 2 way data binding in my app for
  input elements/widgets.
  So, every input element/widget knows its corresponding model and model attribute name.<br>
  When the user hits tab or enter, the field value is automatically given to the model.</p>
  
  <pre><code>container.model.set(this.attrName, this.value, options); // command 1
  </code></pre>
  
  <p>In the other direction, when the model gets updated from the backend, the view of the
  input element/widget should automatically get
   updated:</p>
  
  <pre><code>container.model.bind("change:"+ this.attrName, this.updateView, this); // command 2
  </code></pre>
  
  <p>The problem is:<br>
  When the user hits enter and the model is automatically updated, also the "change:abc" is
  triggered and this.updateView is called, not only when a new model comes from the
  backend.</p>
  
  <p>My solution until now was to pass an option "source: gui" when setting the model value when the user pressed enter (command 1), and to check for that in my updateView method. But I am not content with this solution anymore.</p>
  
  <p>Does anybody have a better solution?
  Thanks alot in advance<br>
  Wolfgang </p>
  
  <p>Update:<br>
  When the option silent: true is passed, the validate method of the model is not called, so 
  that does not help. See Backbone.js source 0.9.2:</p>
  
  <pre><code>_validate: function(attrs, options) {
    if (options.silent || !this.validate) return true;
  </code></pre>