+1

On 04/23/2013 02:39 PM, Derrell Lipman wrote:
I think Thomas was suggesting that you open a bug for the fact that there's no tutorial or explanation of how to use the new XHR class for this purpose. If the one currently documented is deprecated, a new explanation needs to be written for the manual.

Derrell

On Tue, Apr 23, 2013 at 8:34 AM, miguelmello <[email protected] <mailto:[email protected]>> wrote:

    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]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




------------------------------------------------------------------------------
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

------------------------------------------------------------------------------
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

Reply via email to