title: how to populate Ember.Select options via computed property based on selected option of another Ember.Select
body: <p>I'm struggling to get this basic functionality to work in Ember. How can I populate the options of an Ember.Select view via a computed property that's observing another property which is set through another Ember.Select?</p>
  
  <p>Here's what I've done so far:</p>
  
  <p>HTML/HBS:</p>
  
  <pre><code>&lt;script type="text/x-handlebars"&gt;
  
      {{view Ember.Select
      content=parent
      optionValuePath="content.id"
      optionLabelPath="content.name"
      value=current_parent}}
  
      {{view Ember.Select
      content=child
      value=current_child}}
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>App.ApplicationController = Ember.ArrayController.extend({
      content: '', current_parent: null, current_child: null,
      parent: function() {
          return this.store.find('user');
      }.property(),
      child: function() {
          var current_parent = this.get('current_parent');
          if (current_parent) {
              this.store.find('user', current_parent).then(function(parent) {
                  return parent.get('children');
              }
          }
      }.property('current_parent')
  });
  
  App.User = DS.Model.extend({
      name: DS.attr('string'),
      children: DS.attr(),
  });
  </code></pre>
  
  <p>returned JSON from server:</p>
  
  <pre><code>    users: [{id: 0, name: 'test', children: ['child1', 'child2']}]
  </code></pre>
  
  <p>and obviously this is not working. I'd appreciate explaining where I'm going wrong here and what would a viable method be to implement this, please.</p>
  
  <p>I'm using the following libs:</p>
  
  <ul>
  <li>Ember 1.4.0</li>
  <li>Ember Data 1.0.0-beta.6</li>
  <li>Handlebars 1.3.0</li>
  </ul>
  
  <p>Thanks in advance!</p>