> Hey qooxdoo gurus,
>
> I am currently writing a kind of web based file manager for a portal
> server and I wonder: Can a qx.io.remote.Request be reused?

Nope. Make sure you construct a new object instance for each request you
are going to make.

T.

>
> Have a look at my code to know what I mean:
>
>                var r = new
> qx.io.remote.Request("/fs/move.json/"+this.getCurrentPath()+"/"+d.oldValue,
> "GET", "application/json");
>                r.setParameter("destination",
> this.getCurrentPath()+"/"+d.value);
>                r.addListener("failed", function(e) {
>                   alert("The file could not be renamed: Permission
> denied.");
>                   this.tableModel.setValue(d.col, d.row, d.oldValue);
>                   }, this);
>                r.addListener("completed", function(data) {
>                      if(data.getContent() == "exists")
>                      {
>                         if(confirm("The destination object exists.
> Overwrite?"))
>                         {
>                            r.setParameter("overwrite", "true");
>                            r.reset();
>                            r.send();
>                         }
>                      }
>                      else
>                         this.onChangeTreeSelection();
>
>                   }, this)
>                r.send();
>
> As you can see, the request asks the server to move a file, but it might
> happen that the file exists (then the server returns the string
> "exists") and qx resends the request with the overwrite parameter set to
> true which forces the server to overwrite it.
> The solution above works, the only issue I have: The "completed"
> listener is not executed again...
>
> Any idea?
>
> Thanks
>
> Jörg
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>



------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to