0
我使用http服务在数据网格中使用基于字符的搜索名称。所以我用文本框和数据网格,fcomptxt是文本框ID fComptxt.addEventListener(Event.CHANGE,applyFilter);
如何在flex中快速搜索?
public function applyFilter(e : Event):void {
CompanyViewBean.companyViewBean = new CompanyViewBean();
CompanyViewBean.companyViewBean.subAction
= new XML("<actionContext><actionName>SearchCompany</actionName></actionContext>"); var nameSearch:String = fComptxt.text; CompanyViewBean.companyViewBean.companyName=<name>{nameSearch}</name>;
xmlGeneration()
}
在xmlgeneration功能我发送请求使用http服务断绝。但是我的说明是
- 如果他们输入快速度,然后得到错误(HTTP错误)
- 是否有任何可能做任何其他方式实现快速搜索
- 我用键盘按下事件并键盘了事件则没有使用相同的问题发生。
谢谢Jeffry。这对我非常有用 – 2010-09-25 10:16:47
他们怎样取消正在进行的远程请求?因为如果我发送请求然后严重处理,那么我如何取消该请求? – 2010-09-25 10:23:05
使用HTTPService.cancel取消请求http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/HTTPService.html#cancel()或在RemoteObject/WebService/HTPService上断开连接命令http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/AbstractService.html#disconnect()。这可能不会取消服务器上的任何内容,但会阻止Flash Player侦听响应。 – JeffryHouser 2010-09-25 12:38:19