Hi all,
I am a newbie in Sencha, so there are many things I still don't understand how they work properly.
We need to populate a form list on the device with question retrieved from the server through webservices calls. At the same time, once the form list is retrieved and the user introduce this data, through the webservices again this information should be sent to the server.
The approach we are currently trying by following some examples here and there would be the following:
* Define a model (with the fields used by the forms). This model would contain the ajax/rest proxy in order to make the call to the webservices and once the result is received, to parse the response into the model itself.
* Define a store. This store will contain the previously described model in order to save in the localStorage the data received from the server. So the proxy used by this store would be the localstorage.
So we could not make this work. On the localStorage, we could see the name of the variable but with no data inside. We know for sure that the webservices are hit and they send the response back, but we couldn't find a way to storage it locally.
One of our suspicions is that since the response from the web is asynchronous, somehow we are defining our store probably synchronously so, there is no information at running time.
Would this approach to be feasible? Or we should follow other approach to retrieve and storage the data? We tried to search for working examples about this matter, and we couldn't find any useful one. If you can point me out to some working examples or tutorials I would really appreciate since I am very stacked with this issue.
Thanks in advance!
I am a newbie in Sencha, so there are many things I still don't understand how they work properly.
We need to populate a form list on the device with question retrieved from the server through webservices calls. At the same time, once the form list is retrieved and the user introduce this data, through the webservices again this information should be sent to the server.
The approach we are currently trying by following some examples here and there would be the following:
* Define a model (with the fields used by the forms). This model would contain the ajax/rest proxy in order to make the call to the webservices and once the result is received, to parse the response into the model itself.
* Define a store. This store will contain the previously described model in order to save in the localStorage the data received from the server. So the proxy used by this store would be the localstorage.
So we could not make this work. On the localStorage, we could see the name of the variable but with no data inside. We know for sure that the webservices are hit and they send the response back, but we couldn't find a way to storage it locally.
One of our suspicions is that since the response from the web is asynchronous, somehow we are defining our store probably synchronously so, there is no information at running time.
Would this approach to be feasible? Or we should follow other approach to retrieve and storage the data? We tried to search for working examples about this matter, and we couldn't find any useful one. If you can point me out to some working examples or tutorials I would really appreciate since I am very stacked with this issue.
Thanks in advance!
Aucun commentaire:
Enregistrer un commentaire