On Wed, Aug 12, 2009 at 14:56, Ken MacDonald <[email protected]> wrote:
> Hi,
> I have a large ui.table.simple (roughly 30K entries). I've added a
> "changeSelection" listener to it, so that when I select a new row in the
> table, it populates a preview panel elsewhere with info about the selection.
> Good so far. What I'd like to do after checking the info in the preview
> pane, is to be able to 'dblclick' the same item in the original table to add
> it to a "final" list pane.
>
> I've implemented the "final" list as a form.list, and have been able to
> attach a listener to each listitem so that I'm able to 'dblclick' there and
> remove the item from the list. This seems fine, as the final list will only
> contain maybe a dozen entries.
>
> However, there doesn't seem to be a good way to add a 'dblclick' listener
> to the original table; I don't know if I could add listeners to each row in
> the table, but suspect that would make loading it take a long time indeed.
> Is there a good way to accomplish all of this?
>
>
I can't tell from your description whether you just need to know that the
original table was double-clicked, or if you need to know specifically
*where* it was double-clicked. Getting the row on which it is clicked is
easy. Getting the particular column: not so much.
Each Scroller has its own handling of the double-click event, which then
fires a cellDblClick event. Table has its own implementation of
addListener() that applies your listener to each Scroller, so I think you
can do this:
table.addListener(
"cellDblclick",
function(e)
{
var data = e.getData();
var scroller = data[0];
var clickEvent = data[1];
var tableRow = data[2];
alert("The table was double-clicked on row " + tableRow + ". Isn't
that cool?");
});
Take a look at qx/ui/table/pane/Scroller.js:1419 and
qx/ui/table/pane/Table.js:1940 for additional details.
Cheers,
Derrell
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel