Hi all,

Please, somebody is working with RemoteTableModel?
Any tip is wellcome ...


---------- Forwarded message ----------
From: Ricardo Borillo <[EMAIL PROTECTED]>
Date: Sep 20, 2006 10:04 AM
Subject: RemoteTableModel
To: qooxdoo Development <qooxdoo-devel@lists.sourceforge.net >

Hi,

I'm trying to extend qx.ui.table.RemoteTableModel for loading data from a database in a "live" way.
The data loading seems to work. The rows are created in the table, but they have no content (i attach an screenshot).

Source code:

>>> DBRemoteTableModel.js <<<

qx.OO.defineClass("uji.ui.DBRemoteTableModel", qx.ui.table.RemoteTableModel , function () {
    qx.ui.table.RemoteTableModel.call (this);
});

qx.Proto._loadRowCount = function()
{
    this._rowCount = 3000;
    this._onRowDataLoaded();
};

qx.Proto._loadRowData = function(firstRow, lastRow)
{
    var result = [];

    for (var i=firstRow ; i<lastRow ; i++)
    {
        result.push([ "Nombre "+i, "Tag "+i ]);
    }

    this._onRowDataLoaded(result);
};


>>> test.js <<<

qx.dev.log.Logger.ROOT_LOGGER.setMinLevel(qx.dev.log.Logger.LEVEL_DEBUG);

qx.core.Init.getInstance().defineMain(function()
{
    var d = qx.ui.core.ClientDocument.getInstance();

    var tableModel = new uji.ui.DBRemoteTableModel();
    tableModel.setColumns([ "Column 1", "Column 2" ]);
    tableModel.prefetchRows(0, 150);
    tableModel.setColumnSortable(0, true);
    tableModel.setColumnSortable (1, true);

    var table = new qx.ui.table.Table(tableModel);

    table.set({ width:500, height:300 });
    table.getSelectionModel().setSelectionMode(qx.ui.table.SelectionModel.MULTIPLE_INTERVAL_SELECTION );
    d.add(table);
});


Thanks for your help!!


--
Salut,
====================================
Ricardo Borillo Domenech
Analista/Programador - Servei d'Informàtica
Universitat Jaume I
http://xml-utils.com



--
Salut,
====================================
Ricardo Borillo Domenech
Analista/Programador - Servei d'Informàtica
Universitat Jaume I
http://xml-utils.com

<<attachment: table.jpg>>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to