On Mon, Sep 22, 2008 at 2:46 AM, Hugh Gibson <[EMAIL PROTECTED]> wrote:
> Derrell,
>
> I've been using the remote table for a couple of years and haven't ever
> hit this "fundamental problem" that you talk of.
> It appears that you have misunderstood how the row data is stored in the
> remote table. It actually is a map from column name to column information.
> Changing this to an array, as you have done with your checkins, would
> have a significant impact on our code. We store additional information
> about the row which helps with context menu content and which colour to
> use as background etc.
Hi, Hugh. Thanks for your comments!
Actually, I hadn't changed anything from a map to an array; I had just
changed which "index" (property of the map) was used to reference the map. I
changed it from the string ID to the column number. However, I now see that
the data provided to the Remote data model is intended to be different than
the data passed to the Simple data model. I had assumed (incorrectly) that
an efficient array of arrays would be passed from the server to the
client... just as an array of arrays is passed to the Simple data model. No
such luck, I see. Instead, we need to pass the column id with each and
every value. Mighty inefficient and bandwidth wasteful, but I suppose for
the small amount of data on each request, it's not a huge issue.
I've reverted my change to Remote.js so that existing code doesn't break,
and I have patched my example so that it can work with the unaltered
Remote.js. There are problems, though. In order for a map to be passed
between server and client, the server and client must agree on the ID
values. By default, the column id values are the same as the column heading
values. That's all well and fine until the column headings are localized.
Then, a client in Germany would expect the server to send one set of id
values while a client in England would expect a different set. Internally,
there's no need for the ID values to be localized. This is purely a data
model issue, not one that the application should have to deal with. It is
possible to override the id values for the columns by calling
dataModel.setColumnIds(), and it would seem reasonable that the data model
which extends Remote would in fact do this. The problem is that when the
data model is passed to the constructor of the Table, the ID values are
reset to the column names. That, I think, shouldn't happen. If the ID
values have been set already, I do not believe that setting the column names
should override the previously-set ID values. Would you agree? How did you
get around this? Are you just not concerned with localization (and can
therefore use the column names)? Did you have the application deal with it
after instantiating the table?
Derrell
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel