Hi all,
It seems as though 'Request' objects can only be used once. Code that tries
to reuse [1] will only send the request once. Even though I 'setData' on
each button press subsequent sends do nothing. Additionally the "completed"
listener also only fires the first time.

This is somewhat counter-intuitive and it took me a while to figure out that
both the request and listener have to be freshly made [2] with each button
press. Is this the intended usage?

thanks ...
deech



[1]
     var req = new qx.io.remote.Request("/library", "POST");
     button.addListener("execute", function(e) {
      req.setData("isbn=" + isbn.getValue());
      this.debug(req.getData());
      req.send();
     });

     req.addListener("completed", function(e) {
      resp = qx.util.Json.parseQx(e.getContent());
      this.debug("done");
      this.debug(resp);
     });

[2]
    button.addListener("execute", function(e) {
      var req = new qx.io.remote.Request("/library", "POST");
      req.setData("isbn=" + isbn.getValue());
      this.debug(req.getData());
      req.send();

      req.addListener("completed", function(e) {
       resp = qx.util.Json.parseQx(e.getContent());
       this.debug("done");
       this.debug(resp);
      });
     });
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to