On Thu, Dec 16, 2010 at 21:34, aditya siram <[email protected]> wrote:
> By paged table I mean a table that where data is separated out into
> 'n' pages and has Next, Previous, First and Last buttons. An example
> is the YUI Data Table [1] and this JQuery widget [2].
>
> It's a standard widget for most web email clients where messages are
> shown one page at a time.
>
Ah, ok. We have that, but in a little bit different form. The qooxdoo Table
(qx.ui.table.Table) has an option for a Remote data model. This means that
only a small subset of the table data is requested of the server at any one
time -- just enough so that when the user scrolls (page-up, page-down), the
data is already available. As the user scrolls, additional data is requested
from the server. This is similar to the next/prev buttons, except that the
data for the next page has already been retrieved so there's no delay in
rendering it.
To use a remote data model, you subclass qx.ui.table.model.Remote and
provide two functions: _loadRowCount() and _loadRowData(forstRow, lastRow).
You can use whatever mechanism you want in these functions to communicate
with your server (e.g., qx.io.remote.Rpc). You then tell the table to use it
by passing an instance of your subclass (maybe in a variable called
myRemoteModel) to table.setTableModel(myRemoteModel).
You could also, if you really wanted to, you could provide next/prev buttons
for the table that scrolled it forward and backward a page (or buttons to go
n pages forward or backward or to any arbitrary index) to give it that
"old-fashioned" email page look and feel. (Recall that actual page-based
email, with next/prev page buttons, was developed for standard web pages
before there were even background requests to the server available. There
was no way to scroll through lots of rows of data -- more than you'd want to
load into the browser all at one time -- without a server request. These
days, the need for that type of interface is mostly deprecated.)
Cheers,
Derrell
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel