Wednesday, August 3, 2011

Detecting a checkbox click

I'm trying to detect a checkbox selection "click" so I can do some other work (enable a button/change some css.. trivial stuff)

I tried GWTQuery, which fails (I can bind a click handler to every checkbox.. but after 1 click, CellTable appears to remove my bindings hah)

I've tried overriding piles of methods.. setting handleSelection to true and overriding methods.. and in the end.. I can't seem to solve this trivial use case.

i'm doing:

table.setSelectionModel(selectionModel, DefaultSelectionEventManager.<MyObject> createCheckBoxManager());
(selection Model is single selection)

I've seen posts on stack overflow about a custom checkbox manager, but none of the code compiles/works (even if I try to tweak it to get it compilable)

I also tried using column.setFieldUpdater (how i've done click handler on other columns) and that as well fails to work.

I assume this is a solved problem, but google searching has failed me :)

Anyone :)?

Thanks in advance,
Roger

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment