dabd wrote: > > I am trying to fetch data to a store using jsonp (as in the twitter > example). > This is the code I am using: > > url = "http://localhost:8080/sparql/resources/sparql/getusers"; > store = new qx.data.store.Jsonp(url, null, "callback"); > model = store.getModel(); > > However when I debug the code the model variable is null so it seems like > it is not fetching the data. > > The way I am creating the response on the server side using Java is this > (just wrap the json data with the callback if it is provided) and I return > the result as an application/json media type. > String jsonResult = r.json(url).object().toString(); > String result = StringUtils.isEmpty(callback) ? "" : callback + "(" + > jsonResult + ");"; >
By debugging the request and response I can see that the jsonp returned is qx.data.store.Jsonp[503].callback(<json data here>); so there are no issues with the network communication. I suppose the above callback creates the model which is a qooxdoo object containing the json data but why is it that I cannot access the data with store.getModel()? Thanks. -- View this message in context: http://qooxdoo.678.n2.nabble.com/Cannot-get-data-into-model-from-data-store-using-jsonp-tp6341823p6341981.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
