CheckBoxColumn should be CheckboxHeader! Sorry for the confusion! Am Freitag, 28. Dezember 2012 14:18:00 UTC+1 schrieb Alex opn: > > Hello folks, > > I've encountered a problem with a > CheckBoxCell<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/cell/client/CheckboxCell.html>in > a custom built header for a > DataGrid<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/cellview/client/DataGrid.html> > . > > What I've done is adapting the > CwCustomDataGrid-example<http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#%21CwCustomDataGrid>to > my needs and adding a "Check all"-column in the header. I'm using the > CheckboxColumn implementation from the accepted answer from here: ->> > StackOverflow<http://stackoverflow.com/questions/8828271/handling-onclick-for-a-checkbox-in-a-celltable-header> > > > This is how I add the valueChangeHandler to the column in the constructor > of my CustomHeaderBuilder: > >> checkboxHeader.addValueChangeHandler(new ValueChangeHandler<Boolean>() { >> // TODO: Fix, does not work :-/ >> @Override >> public void onValueChange(ValueChangeEvent<Boolean> >> event) { >> final boolean selected = event.getValue(); >> ... >> } >> }); >> > > I've also tried several other places to register the handler before and > after the construction of the CustomHeaderBuilder without any effect. > > The strange thing is that the CheckBoxColumn works flawlessly when not > using a custom built header. But the problem is that the column is not > propagating any events when used in combination with an > AbstractHeaderOrFooterBuilder<http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/cellview/client/AbstractHeaderOrFooterBuilder.java?r=10597> > . > > I debugged a lot already and can confirm that the handler gets registered > correctly and the column-instance used is definitely the same all the time. > > Anyone has an idea what could prevent events from Cells / Columns in > custom built headers / footers? > > Thanks > Alex >
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/PMkLTwKrKhsJ. To post to this group, send email to google-web-toolkit@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.