ActionCell already returns false for handlesSelection(). If a cell declares to handle the selection, the default way of (de)selecting, by clicking in the row, does not work anymore. Then it is the value- updater's task to do so. I recently wrote something about it in a blog post. See for more information: http://thoughtsofthree.com/2011/02/creating-a-gwt-radiobuttoncell/ (paragraph "Depending on and handling the selection")
On Feb 22, 5:30 am, Patrick Tucker <tucker...@gmail.com> wrote: > I haven't played with this a whole bunch but have you looked at > handlesSelection? I was under the impression that by setting this to > false you indicate that a particular cell type is not allowed to > determine selection state? > > Like if you have a checkboxcell it can be the only cell that > determines whether or not the row is selected. > > On Feb 11, 2:09 pm, "Henry H." <djhenr...@gmail.com> wrote: > > > > > > > > > yeah, i had the feeling i have to ditch the selectionModel. > > thanks for your help... > > > On Feb 11, 6:28 am, Thomas Visser <thomas.vis...@gmail.com> wrote: > > > > This is not possible. In your case, the click event is always also > > > given to the SelectionModel. > > > > See line 971 in CellTable (http://www.google.com/codesearch/p? > > > hl=en#A1edwVHBClQ/user/src/com/google/gwt/user/cellview/client/ > > > CellTable.java&q=CellTable%20package:http://google-web-toolkit > > > %5C.googlecode%5C.com&sa=N&cd=1&ct=rc): > > > > if (selectionModel != null && "click".equals(eventType) && ! > > > handlesSelection) { > > > selectionModel.setSelected(value, true); > > > > } > > > > As you can see, if you could make the handlesSelection boolean true, > > > the selectionModel will not be updated. This boolean is true if one > > > (or more) cell(s) declare(s) to handle the selection. ActionCell does > > > not do that. What you can do is create your own cell, make it handle > > > the selection, and use it for all the columns that you want to be > > > clickable. > > > > On Feb 11, 1:42 am, "Henry H." <djhenr...@gmail.com> wrote: > > > > > hi, > > > > i have a celltable with a selectionModel but also a column of > > > > actioncells. > > > > the selectionModel and actioncells both handle click events, but when > > > > i click the action cell, it also triggers the selectionmodel click > > > > handler. > > > > is it possible to prevent this? Or do i have to nix the selectionModel > > > > and go with clickable cells on the row? > > > > > thanks. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.