Humm! Don't see a huge need to open a bug for that. Indeed, I have fixed the
problem with the following implementation:
qx.Class.define('myapp.system.CostumerRemoteTable', {
extend: qx.ui.table.model.Remote,
construct: function() {
this.base(arguments);
this.setColumns(
['ID','Nome','CNPJ/CPF','Codigo','Cidade','Fone','Status'],
['id_costumer','nome_costumer','cnpj_cpf_costumer','codigo_costumer',
'cidade_costumer','tel_costumer','status_costumer']
);
},
destruct: function() {
this._disposeObjects('this');
},
members : {
_loadRowCount : function() {
this.__req1 = new qx.io.request.Xhr('/services/index.php', 'POST');
this.__req1.setRequestData({
'class' : 'Costumer',
'method' : 'getCostumersCount',
'args' : '{}'
});
this.__req1.addListener('success', this._onRowCountCompleted, this);
this.__req1.send();
},
_onRowCountCompleted : function(response) {
this.__response1 = response.getTarget().getResponse();
if (this.__response1.status) {
this._onRowCountLoaded(this.__response1.count);
}
},
_loadRowData : function(firstRow, lastRow) {
this.__req2 = new qx.io.request.Xhr('/services/index.php', 'POST');
this.__req2.setRequestData({
'class' : 'Costumer',
'method' : 'getCostumers',
'args' : "\"{ \"from\" : \""+firstRow+"\", \"to\" : \""+lastRow+"\"
}\""
});
this.__req2.addListener('success', this._onLoadRowDataCompleted,
this);
this.__req2.send();
},
_onLoadRowDataCompleted : function(response) {
this.__response2 = response.getTarget().getResponse();
if (this.__response2.status) {
this._onRowDataLoaded(this.__response2.costumers);
}
}
}
});
It has turned to be relatively easy to fix alone. Thanks for your reply.
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/Using-the-remote-table-model-and-Xhr-tp7583322p7583335.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel