views:

27

answers:

1

I used character based searching name in data grid by using http services . so i used text box and data grid , fcomptxt is text box id fComptxt.addEventListener(Event.CHANGE,applyFilter);

    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()

        }

In xmlgeneration function I sending request to sever using http services . But my clarification is

  1. if they typed fastly then get errors (http errors)
  2. Is it any possible do any other way implement quick searching
  3. i used keyboard down event and also keyboard up event then no use same problem occur.
+2  A: 

If you can load up all the data at once, then you can use the sorting functionality of an ArrayCollection to filter data as the user types. It should be pretty quick.

But, if you want to ping the database after every keystroke, you're often going to have issues with lag time between server and client compared the speed of the user's typing.

I can see two options you might investigate:

  1. You could disable the text input after every keystroke until you get data back from the server.
  2. After each keystroke, You could cancel the "in process" remote request before starting the new one.
www.Flextras.com
thanks lot Jeffry . it's very useful to me
R.Vijayakumar
what are they way to cancel the in process remote request ? Because if i send request then sever processing then how can i cancel that request ?
R.Vijayakumar
Cancel the request using HTTPService.cancel http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/HTTPService.html#cancel() or disconnect on the RemoteObject/WebService/HTPService commands http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/AbstractService.html#disconnect() . This probably won't cancel anything on the server, but will stop the Flash Player from listening for the response.
www.Flextras.com
yes , we can do like this . Thanks ounces again
R.Vijayakumar