On 27 août, 10:45, jocke eriksson <jock...@gmail.com> 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 google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to