> Yes, that did the trick, thank you! However, since > qx.ui.table.model.Simple does fine without named column data, it would > be worth thinking about reworking the remote table model accordingly. > not having the repetitive column ids in the transferred code saves a lot > of bandwith and with the right metadata, you really do not need to have > data structure with named columns.
Hi all, as far as I recognize, something like this //... setColumns(["First name", "Middle name", "Last name"], [0, 1, 2]); //... // Data "example" data = [ {"foo", "bar", "baz"}, {"Foo!","BAR!", "zoo"}, ...]; works, too. Correct me if I'm wrong. I used this technique a while ago and it worked as expected (minimum bandwidth). Although the access to the data is "not so nice" when you have to access some column in a row like " row[2] " etc. /Peter > > Christian > > bibliograph schrieb: >> Hello Hugh, >> >> thanks for the info. I'll try that. I simply assumed that the data >> structure would be the same as in the Simple Table Model. I use tables >> throughout my app with qx.ui.table.model.Simple and the data structure >> is always like the one I describe. >> >> Christian >> >> >> Hugh Gibson schrieb: >> >>>> thanks, but this is not the problem. Both the setRowCount() and the >>>> setRowData() methods are called with the respective data. >>>> setRowData() passes the data to the superclass _onRowDataLoaded() >>>> method as required by the superclass. The data is there - I can get >>>> it with getTableModel().getRowData() - but it is not rendered... >>>> >>>> >>> OK. >>> >>> >>> >>>> My data looks like this: >>>> >>>> [ [ "foo","bar","baz"],["Foo!","BAR!","zoo"], ...] >>>> >>>> >>> This is the issue. The table works on a map specifying column ID and >>> value. This allows columns to be reorganised without having to change the >>> base data. >>> >>> You have to set up the columns in the Abstract table model, base class of >>> the remote table model. See setColumns in >>> http://demo.qooxdoo.org/current/apiviewer/#qx.ui.table.model.Abstract >>> >>> For example: setColumns(["First name", "Middle name", "Last name"], >>> ["f", "m", "l"]) >>> >>> Then your data will be: >>> >>> [ {"f":"foo", "m":"bar", "l":"baz"}, >>> {"f":"Foo!", "m":"BAR!", "l":"zoo"}, ...] >>> >>> One nice thing about this is that you can have additional keys in the >>> data for each row, with hidden information. We use that for info that >>> enables us to identify the row, and hold security information etc. >>> >>> Hugh >>> >>> [...] ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel