Thanks, I need the behavior so I guess once I get 6.6 running (still having
issues in my code, code that does not go through the migration) I'll try and
add this to my code.
Thanks,
Jim
On 3/7/07, Til Schneider <[EMAIL PROTECTED]> wrote:
Jim Hunter schrieb:
> When there is a row selected in the table and the user clicks a column
> header to sort it, the selected row goes away (no more selected row) and
> the highlighted row moves. This doesn't sound like a big deal until you
> have multiple grids on a page and the data from one grid is dependent on
> the selected row of another. Once the selected row gets moved, the
> 'link' between the tables is destroyed yet the user isn't aware of it.
> The selected and highlighted rows should stay as the column is sorted.
> If one has to be lost, let it be the highlighted row, not the selected
> row since the selected row is the most important of the two.
The table has no concept for backing up a selection before sorting and
restoring it after sorting. The reason for this is that this isn't
possibile for any table model. A RemoteTableModel for instance has not
all data on the client side and therefore it isn't able to get
identifiers for every selected row. Another reason is that such a backup
gets slow for large selections.
That's why the table clears the selection, in order to ensure that no
wrong row is selected.
But you could add this backup and restore behaviour on your own:
* Just throw an event in your table model when the sortByColumn method
is called. You have to throw this event before the sorting code.
* In your controller (which knows the table model and the selection
model) listen on that event and backup the selection (remember the IDs
of the selected rows. You could use SelectionModel.iterateSelection for
this).
* Let the controller listen also on the dataChanged event. Check there
whether you have a selection backup. You there is one, then restore it
and set it to null.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel