Sencha touch 动态填充Sencha触控选择器

Sencha touch 动态填充Sencha触控选择器,sencha-touch,Sencha Touch,我正在我的一个移动项目中使用Sencha Touch。作为它的一个组成部分,我正在使用选择器。我知道选择器值是从“data”属性中获取的,该属性是一个包含如下对象的数组: [{"text":"One","value":1},{"text":"Two","value":2},{"text":"Three","value":3}] 然而,我需要做的是用从存储动态生成的数组中的值填充选择器。有人能帮我吗 谢谢。使用它可以向其中添加Ext.data.Store。存储将使您能够从服务器获取数据,并且将填

我正在我的一个移动项目中使用Sencha Touch。作为它的一个组成部分,我正在使用选择器。我知道选择器值是从“data”属性中获取的,该属性是一个包含如下对象的数组:

[{"text":"One","value":1},{"text":"Two","value":2},{"text":"Three","value":3}]
然而,我需要做的是用从存储动态生成的数组中的值填充选择器。有人能帮我吗

谢谢。

使用它可以向其中添加Ext.data.Store。存储将使您能够从服务器获取数据,并且将填充选择器插槽

这是Sencha文档中给出的内容:

A general picker class. Ext.picker.Slots are used to organize multiple 
scrollable slots into a single picker. slots is the only necessary configuration.

The slots configuration with a few key values:

name: The name of the slot (will be the key when using 
getValues in this Ext.picker.Picker)
title: The title of this slot (if useTitles is set to true)
data/store: The data or store to use for this slot.
Remember, Ext.picker.Slot class extends from Ext.dataview.DataView.
使用它可以向其中添加Ext.data.Store。存储将使您能够从服务器获取数据,并且将填充选择器插槽

这是Sencha文档中给出的内容:

A general picker class. Ext.picker.Slots are used to organize multiple 
scrollable slots into a single picker. slots is the only necessary configuration.

The slots configuration with a few key values:

name: The name of the slot (will be the key when using 
getValues in this Ext.picker.Picker)
title: The title of this slot (if useTitles is set to true)
data/store: The data or store to use for this slot.
Remember, Ext.picker.Slot class extends from Ext.dataview.DataView.