On Tue, Jun 30, 2009 at 8:20 AM, <[email protected]> wrote:

>
>  Hi Derrell
>
> Please find below the original contexts of the message. Sorry for not
> including it on the first place.
>
> I understand how override _identifyImage method, the only problem is that
> those cells already have HTML renderer and I need to add cell click events
> on the top of that. Do you think this can be done?
>

Yes it can be done. When you're working with cell renderers, though, you're
working at a very low level. Instead of overriding the _identifyImage method
as you'd do if you were extending the Boolean cell renderer, you will extend
the Html cell renderer and override the _getCellExtras() method. If you look
at the Html cell renderer, you'll see that it does nothing other than extend
the Abstract cell renderer. Looking at the Abstract cell renderer, you'll
see that it simply creates a div using any style that had been specified by
the _getCellStyle() method, and with any extra attributes as provided by the
_getCellExtras() method. (Don't be afraid to look at the source of these
classes! That's the very best way to learn what's going on and how you can
best make use of them.)

When you override the _getCellExtras method, you'll need to catch the DOM's
double-click event, in a fashion similar to how the Boolean cell renderer
adds an "onclick" event. Since you are extending qooxdoo's functionality
here, you need to get your hands dirty; you don't get the benefit of the
clean-room (no interaction with the DOM) that ordinary usage of qooxdoo
provides. :-)

Derrell



>
> S pozdravem / Best regards,
>
> Monika Falk, Software Specialist
> Tieto
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 26 Jun 2009 08:16:23 -0400
> From: Derrell Lipman <[email protected]>
> Subject: Re: [qooxdoo-devel] Progressive table
> To: qooxdoo Development <[email protected]>
> Message-ID:
>        <[email protected]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Fri, Jun 26, 2009 at 7:05 AM, <[email protected]> wrote:
>
> >  Hi Everyone
> >
> > I want to ask if progressive table has most of the functionality of
> > ordinary table? Like click and double click events etc? I could not
> > find it in docs.
> >
>
> Hi Monika,
>
> Progressive's Table allows one to create such events in a cell renderer or
> row renderer but by default it doesn't provide them. To see how/where you'd
> add such events, look at the boolean cell renderer:
> qx.ui.progressive.renderer.table.cell.Boolean, and search for where the
> allowToggle property is used. You'll see where it creates onclick events to
> handle the toggling of the icon, which is also were you'd add any events you
> want generated. The easiest way to do this would be to subclass the cell
> renderer and override the _identifyImage method.
>
> Cheers,
>
> Derrell
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>



-- 
The trick to education is to teach people in such a way that they don't
realize they're learning until it's too late.
 - Harold Eugene "Doc" Edgerton ("Poppa Flash"), 1903-1990, fabled MIT
professor and inventor of the stroboscopic flash
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to