View Full Version : How to determine whether a specific record exist in the Store?

22 May 2010, 11:02 PM
use find or query?

23 May 2010, 12:18 AM
if you filter use query to search in all.

23 May 2010, 4:33 AM
Here is my situaiton:

It's a small module for the application. User need to input his or her phone number to update his info in the system.
Then I need a countryCode combobox and cityCode combobox to accept user's input.

When user first select a country, then I send a ajax request which contains the country id as parameter to server, fetch all the cities of that country. The received records are appended to the store cache.

when user select city combobox first, all the cities around world are fetched from the server.

I need a mechanism to determine whether a country's cities already in the city store cache.

My problem is, even in case2, that is all the cities are in the cache. the find function always return false for the first time, even if the cities are all there!