在Sencha touch中的搜索字段上设置列表值
Set the list value on the searchfield in Sencha touch
我在控制器上有这个方法
onResponsibleSuggestListTap: function (list, index, target, record, event, eOpts) {
var activityGeneral = this.getActivityGeneral();
//set the text field value
activityGeneral.down('#responsible').setValue(record.get('value'));
console.log(record.get('value'));
//hide out floating list
this.getResponsibleSuggest().destroy();
//clear the drop down list
this.onClearResponsibleField();
},
并且在视图中:
items: [
{
xtype: 'container',
width: '60%',
padding: '0 3px 0 0',
items: [
{
xtype: 'searchfield',
itemId: 'responsibleSearchField',
placeHolder: 'introduces..."
}
]
}
]
但是我无法在点击搜索字段中的项目后设置值,我做错了什么??
非常感谢!
根据以下进行更改后尝试
activityGeneral.query('searchfield[itemId=responsibleSearchField]')[0].setValue(record.get('value'));
相关文章:
- 无法使用PHP动态设置下拉列表中的值
- 列表样式在IE中未设置为none,但在IE中适用
- 如何使用javascript将值引导下拉列表设置为隐藏值asp.net
- 如何在NativeScript中从列表中删除项目时设置动画
- 当按下链接以在不同页面上的表单中的下拉列表中设置值时
- 如何通过javascript设置支柱列表2
- 无法将对象列表从视图模型设置为 javascript 变量
- jQuery 设置和获取下拉列表和输入的本地存储数据
- 使用子项设置列表项的样式
- 如何在javascript中父下拉列表的onchange事件上设置列表框的多个选定值
- 引导程序 3:如何设置列表以展开
- 如何设置“列表”从下到上的动画
- 使用Angular+ng animate以圆形方式设置列表的动画
- 在Sencha touch中的搜索字段上设置列表值
- AngularJS-通过dons't在ng模型中设置列表对象
- JQuery按顺序设置列表项的动画,然后淡出列表并重复
- 正在按给定的id序列设置列表顺序
- 如何使用数组提供的值设置列表框中选定的项
- Reactjs的onClick:如何设置列表中被点击按钮的状态
- 基于列表框选择设置列表项