Hi again,
Got it working now, I think. The "getData()" call you sent below should be
actually "getRow()" which returns the tableRow number directly. "e" in this
case is a CellEvent, which doesn't have a getData() method.
Thanks,
Ken

On Wed, Aug 12, 2009 at 4:30 PM, Ken MacDonald <[email protected]> wrote:

> Thanks Derrell,
> I tried this on my table, and firebug reports:
> >     function(e)
> >     {
> >       var data = e.getData();  <==== e.getData() is not a function
> ********************
> >       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?");
>
> I removed the 'data' code and just left a simple alert() and at least
> the dblClick listener is working. And in clarification, it seems like
> returning the tableRow number should be sufficient for what I'm doing;
> I think I can figure out what I need from there.
> Thanks,
> Ken
>
> On 8/12/09, Derrell Lipman <[email protected]> wrote:
> > 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

Reply via email to