我在extjs中有一个组合框,它根据用户键入的内容查找用户名。服务器后端以$_ get‘’username‘的格式通过GET匹配任何内容。
我的组合用户名叫做queryParam。当我开始输入时,username={whatIType}键的=>值被发送,一个匹配的结果集从服务器返回。但是,如果我单击组合分页的下一页,它将跳过该queryParam并发送不带任何参数的请求,因此我的所有结果都是由服务器发送的,因为没有匹配。
这是我的组合代码:
{
xtype: 'combo',
triggerAction: 'all',
displayField: 'username',
name: 'user_id',
valueField: 'id',
store: usersStore,
typeAhead: true,
minChars: 2,
forceSelection: true,
enableKeyEvents: true,
pageSize: 10,
allowBlank: false,
anchor: '100%',
queryParam: 'username'
}当我开始通过GET输入第一个请求时:
http://localhost/admin/users/?_dc=1310050289796&username=ma&start=0&limit=50&page=1如果我点击下一页:
http://localhost/admin/users/?_dc=1310050740222&page=4&start=150&limit=50知道为什么要重置吗?
发布于 2011-07-07 23:26:38
看起来这是一个已知的错误,将在4.0.4版本中修复...
http://www.sencha.com/forum/showthread.php?137019-Remote-ComboBox-with-paging-loses-queryParam
发布于 2019-11-27 23:39:05
添加此属性queryMode:'remote‘如果显式设置为False值,则不会发送它。
https://stackoverflow.com/questions/6612698
复制相似问题