Thanks for the workaround. It only works if you override the
setRowData() method with the following body:
setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
super.setRowData(start, values);
Scheduler.get().scheduleDeferred(new ScheduledCommand()
{
@Override
public void execute()
{
setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION);
}
});
On Dec 21, 11:24 am, John LaBanca <[email protected]> wrote:
> The logic changed slightly from 2.1.0 to 2.1.1 to try to make it respond
> more naturally to use input, but there are a lot of special use cases. Just
> to make sure I understand correctly, this only happens when the
> KeyboardSelectionPolicy is set to BOUND_TO_SELECTION and you remove the
> selected item? If you replace the data, but include the originally selected
> item, it should remain selected.
>
> It makes sense that if the selected item is lost, we should not reselect a
> new item. I created an issue to track
> this:http://code.google.com/p/google-web-toolkit/issues/detail?id=5790
>
> Thanks,
> John LaBanca
> [email protected]
>
>
>
> On Tue, Dec 21, 2010 at 2:12 PM, Frank Mena <[email protected]> wrote:
> > Looks like some of the behavior of CellTable and CellList has changed
> > between v2.1.0 and 2.1.1.
>
> > When you initially add data now, no item is selected. After any item
> > is selected, there is no way to replace all the data in the table or
> > list without it also selecting the first item. There is no method I
> > could find to do this.
>
> > If I replace the contents of the table, I do not want any item
> > selected automatically or I need a method that lets me turn this off.
> > Currently, the only way I can prevent this is to set
> > KeyboardSelectionPolicy to DISABLED.
>
> > Is there a way to disable auto-selection or to turn off a selection?
>
> > --
> > 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]<google-web-toolkit%2Bunsubs
> > [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.