*/\r
_sendMessage : function(destination, message, type, properties) {\r
var req = new qx.io.remote.Request(this.uri, "POST", "text/plain");\r
- req.setParameter("destination", destination);\r
- req.setParameter("message", message);\r
- req.setParameter("type", type);\r
- if(properties){\r
- for(var key in properties){\r
- req.setParameter(key, properties[key]);\r
- }\r
- }\r
+ if(!properties) properties = {}; \r
+ properties["destination"] = destination;\r
+ properties["message"] = message;\r
+ properties["type"] = type;\r
+ var vParametersList = [];\r
+ \r
+ for (var vId in properties)\r
+ {\r
+ var value = properties[vId];\r
+ if (value instanceof Array)\r
+ {\r
+ for (var i=0; i<value.length; i++)\r
+ {\r
+ vParametersList.push(encodeURIComponent(vId) +\r
+ "=" +\r
+ encodeURIComponent(value[i]));\r
+ }\r
+ }\r
+ else\r
+ {\r
+ vParametersList.push(encodeURIComponent(vId) +\r
+ "=" +\r
+ encodeURIComponent(value));\r
+ }\r
+ } \r
+ if (vParametersList.length > 0)\r
+ {\r
+ req.setData(vParametersList.join("&"));\r
+ }\r
+ \r
//req.addListener("completed", this.endBatch, this);\r
req.send();\r
},\r