That's correct I don't want the click to update the selectionModel. Creating the Cell like new CheckboxCell(true); makes the SelectionModel to get no events at all. On the other hand if I pass in false all events gets pass. I guess I will have to use the Event.NativePreviewHandler
Regards Jocke 2010/8/27 Thomas Broyer <[email protected]> > > On 27 août, 10:45, jocke eriksson <[email protected]> wrote: > > I having trouble with a CheckboxCell, the problem is that if a user > clicks > > on the checkbox the event bubbles up to the row element. This behaver is > not > > what I want, what is the best way to cancel the event from bubbling up. > > Well, first, the event *has* to bubble up, that's the way Cell widgets > work (i.e. using the pattern known as "event delegation"), so you > actually don't want to "cancel the event from bubbling up". I think > you rather don't want the click to update the SelectionModel. > > It seems like there's a bug in CheckboxCell, which reverts the meaning > of its constructor flag (from what I understand from reading the > source code, note that I haven't done any test to confirm these > observations): > - CheckBoxCell(true) will actually make the cell a "simple checkbox", > while > - CheckboxCell(false) will actually make it act like a "select box" > And CheckboxCell() defers to CheckboxCell(false) > > I also think it should listen to "click" events rather than "change" > events, as I'm not sure every browser fires change events (CheckBox > uses click, not change); but that's another story. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
