I got this to multiple selection to work properly by adding a
ButtonCell adjacent to the CheckboxCell. The code is in Bike Shed. The
ButtonCell is also bound to the Selection Model. This takes care of
what seem to be two bugs:
1) the CheckboxCell is not firing a setFieldUpdater event
2) the ButtonCell event is not fired correctly. Giving the table
something else to do, i.e., with the CheckboxCell, helps the event to
propagate correctly.

For the record I also use the Selection Model's selection change
listener to inform the presenter that a selection has changed.

Lastly, you need to make sure your model implements Comparable. The
compareTo, equals, and hashCode have to be well implemented for the
selection model to work ok.



On Aug 26, 9:32 am, jaga <j.annes...@gmail.com> wrote:
> I suppose this is relevant for a CellTable too?
> The code which does the selection is in model object. The
> object'implements Comparable and the equals, compareTo and hashCode.
> Is it possible to pass in a flag which says whether the row is
> selected, then return false for the equals?
>
> On Aug 20, 2:09 pm, rhmoller <rhmol...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I have been digging through the source code for GWT 2.1.0.M2. All
> > click events result in adding to the selection. There is no support
> > for deselecting items in any of the cell widgets.
>
> > I have filed this issue for it:
>
> >http://code.google.com/p/google-web-toolkit/issues/detail?id=5223
>
> > On Aug 19, 1:35 pm, rhmoller <rhmol...@gmail.com> wrote:
>
> > > Hi
>
> > > I am trying to build a component for selecting multiple items from a
> > > tree structure using the cellview widgets from GWT 2.1.0.M2.
>
> > > I have a custom TreeViewModel with a single MultiSelectionModel object
> > > which is shared between all NodeInfo objects. I would like it to
> > > either toggle the selection of items when clicking on them, or support
> > > CTRL-clicking for deselecting items like in a list box.
>
> > > My problem is that I cannotdeselectany of the selected items. What
> > > do I need to do?
>
> > > Best regards
> > > Rene

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