【发布时间】:2014-10-14 07:16:45
【问题描述】:
我们如何根据条件获取值,我尝试如下
var countrynames = Alloy.Collections.countryDetails;
countrynames.fetch({languageID: 1});
countrynames.on("reset", function() {
var countrynamesLength = countrynames.length,
column = Ti.UI.createPickerColumn();
for (var i = 0; i < countrynamesLength; i++) {
var row = Ti.UI.createPickerRow({
title: countrynames.at(i).get("countryText")
});
column.addRow(row);
}
$.countryPicker.columns = [column];
});
countrynames.fetch({languageID: 1});
但是上面没有过滤条件。它正在从表中获取所有值。上述代码如何使用 where 条件。
请有任何建议..
【问题讨论】:
标签: backbone.js titanium titanium-mobile fetch titanium-alloy