How to use Ember.Select to set join identifiers

I am trying to use the Ember.Select control to set the association identifier on a model. However, I cannot force the control to bind it to the id attribute instead of the entire model object. Is it by design in the Ember.Select control? My template has the following:

  {{view Ember.Select
         contentBinding="App.peopleController.content"
         selectionBinding="App.selectedPersonController.personId"
         optionLabelPath="content.fullName"
         optionValuePath="content.id"}}

However, even if you explicitly set selectionBinding for the personId attribute, it still seems to be mandatory for the person object. Full jsfiddle here: http://jsfiddle.net/PXVZb/10/

+5
source share
1 answer

App.selectedPersonController personId, id, . http://jsfiddle.net/PXVZb/11/

JS:

App.selectedPersonController = Ember.Object.create({
    personIdBinding: 'person.id'
});

:

{{view Ember.Select
       contentBinding="App.peopleController.content"
       selectionBinding="App.selectedPersonController.person"
       optionLabelPath="content.fullName" }}
+1

All Articles