mdsami / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

Add opaque object to AjaxCallback #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice if the caller of aq.ajax could pass in an opaque data object 
and get it back in the callback, for example:

public void asyncJson() {
  MyData data = new MyData(...);
  aq.ajax(url, JSONObject.class, data, this, "jsonCallback");
}

public void jsonCallback(String url, JSONObject reply, Object data, AjaxStatus 
status) {
  MyData data = (MyData)data;
  ...
}

this would allow the caller to pass through any request specific information 
that is needed to process the reply.

what do you think?  thanks!

Original issue reported on code.google.com by walt....@gmail.com on 12 Feb 2012 at 7:02

GoogleCodeExporter commented 8 years ago
This is one of the feature that I wanted from time to time and didn't implement.

Original comment by tinyeeliu@gmail.com on 15 Feb 2012 at 9:47

GoogleCodeExporter commented 8 years ago

Original comment by tinyeeliu@gmail.com on 15 Feb 2012 at 9:47