On Wed, Aug 3, 2011 at 7:19 PM, Roger Studner <[email protected]> wrote:
> 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)

When elements are removed/added to the dom, gwt removes non-gwt
managed bindings.
If you can identify those checkboxes with a css selector, you can use
gquery.live() method so as new elements added in the future will
handle the event:

/**
 * Attach a handler for this event to all elements which match the
current selector, now and in the future.
 **/
live(int eventbits, Function... funcs)


>
> 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 [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.
>
>

-- 
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.

Reply via email to