On 18.03.2011 14:42, Derrell Lipman wrote:
> Some people love the column ids. Personally, I've never found a great
> use for them. When they're used, however, they re typically strings, not
> numbers, and without looking at the code, I'm not sure what problems
> using numbers would cause. Also, I think when you use them, the format
> of your data returned by the server must be in the map format, not the
> simple array format as you're using.
>
> To test my hypothesis, please remove the second parameter to
> tm.setColumns() and see if your results are more favorable.
Derrell, thanks for not leaving me alone.
Yes it's true that most examples and the docs seem to say that the
individual rows should be maps and not arrays. So I tried your suggestion::
tm.setColumns(
[ "ID", "name", "name (et)", "Category", "vatExempt", "price",
"description", "description (et)" ],
[ "id", "name", "name_et", "cat", "vatExempt", "price",
"description", "description_et" ]
); // columnNameArr, columnIdArr
and changed the server to respond like this::
{ "count": 10, "rows": [
{ "name_et": "Laud puidust", "catHidden": 1, "name": "Wooden table",
.... },
{ "name_et": "Tool puidust", "catHidden": 1, "name": "Wooden chair",
...}, ...
],
"title": "Products"
}
But sorry, you don't get the prize: unfortunately the problem remains.
Or I'd rather say *fortunately* because AFAICS from the source,
qx.ui.table.model.Remote perfectly supports simple arrays instead of
maps. I prefer to use simple lists (not maps) because it saves bandwidth
and client memory, and it would be redundant to repeat the column names
for each row of a table.
I continue to hope for ideas form this list!
Luc
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel