Closed prmr closed 10 years ago
I am not sure if am following it right. Current the keyword iph shows autocomplete for : Apple iPhone 5c (16GB) (Sprint) Apple iPhone 5s (32GB) (Sprint) Apple iPhone 5s (16GB) (Sprint) Apple iPhone 5s (64GB) (Sprint) Apple iPhone 5s (16GB) (T-Mobile) ........ etc So the proposed autocomplete is for breaking up of all the words , so that iph shows iphone at the top ? Am I presuming this right ?
I somehow get a different behavior this time, with correctly displayed completions from the product list. I will edit the issue to be an enhancement instead.
Just merged into Issue0069. Note that #69 has some non-trivial changes to the web front-end.
Why is POST used to obtain the autocomplete suggestions?
Initially the function was planned to be more dynamic, (some post processing / pre processing on the server side while giving back the suggestions). I later tried to change it to GET,but ajax calls just wouldn't work when I changed to GET. I tried it now as well, but changing it to GET seems to cause an error. I will read in the documentation if any known usage problems exists with using GET.
It seems to work for me. Check out a read-only copy of branch Issue0069 and give it a try.
BTW I moved the logic to ConcreteServiceFacade. Also, the code in autocomplete.js can be cleaned up quite a bit (e.g., using a loop to go through the result array). I also think you can pack your response body as an array directly, which will save you the parsing on the client side.
Issue completed: Displays according to "Category" , "text_Search" and "Brands" . Code in branch Autocomplete_revised. sha :8fd99d6
In autocomplete: