开发者

qx.data.store.Jsonp: configureRequest not getting request as parameter

when creating an new qx.data.store.Jsonp object like this...

var store = new qx.data.store.Jsonp(url, {
  configureRequest: function(req开发者_高级运维) {
    req.setParameter("key", "resources.appsrvs");
  }
},"callback");

... the delegate function configureRequest does not get the request as parameter as described in qx.data.storeInterface.IStoreDelegate. so how can i configure the request?


Unfortunately, not in the way you intend. The Jsonp store uses a ScriptLoader object, as it is designed for cross-domain requests. So your delegate is used, but the 'req' object passed to it is actually a qx.io.ScriptLoader instance. Please see the API doc for ScriptLoader and also here for some additional details.

If you are not planning to do a cross-domain request, consider using qx.data.store.Json instead.


It might have something to do with the fact that qx.data.store.Jsonp internally seems to use qx.io.ScriptLoader for which the documentation says EXPERIMENTAL – NOT READY FOR PRODUCTION.

Also you didn't specify which version of qooxdoo you use. Prior to 1.0.x I think qx.data.store.Jsonp is just an empty stub.

Does your function get called at all? If yes what does it get passes as parameters?

And finally consider just filing a bug report.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜