我想让我的示例数据(从灯具创建的记录)放入我的SC.ListView
。我知道记录是正确构建的,因为我能够通过primaryKey
找到特定数据。如何将我的记录推入SC.ArrayController内容?
的SC.ListView
通过contentBinding: 'MyApp.thisController.arrangedObjects'
从这个SC.ArrayController
拉动其内容:
MyApp.thisController = SC.ArrayController.create(SC.SelectionSupport, {
allowsMultipleSelection: NO,
content: MyApp.store.find(MyApp.MyRecordType)
});
给init商店,我使用的功能从官方指南:
store: SC.Store.create().from(SC.Record.fixtures)
如何设置我的控制器中的内容属性是否导入SC.RecordArray
?
据我所知,实际上应该工作。当你做'MyApp.thisController.get('content')'返回什么? – 2012-07-25 21:01:08
正如我所说,由于我能够访问特定数据,所以商店生成正确 – DonJuwe 2012-08-06 10:27:18