Hi John, thanks for the reply.

Yes, actually I can do it in the app. first load, but later a Place can be
fired programmatically from another UI screens. So, in this case the Place
will be fired twice: 1. programmatically fired and 2. when the menu need to
be selected to update the UI state.

Should I have to remove/add the SelectionChangeHandler every time a menu
need to be selected?

Thanks.

On Wed, Feb 9, 2011 at 12:59 PM, John LaBanca <[email protected]> wrote:

> SelectionModels have to fire a SelectionChangeEvent, or the CellTable
> wouldn't know to highlight the selected item.
>
> Can you set the default selected value before adding your ChangeHandler?
>  You'll have to call selectionModel#isSelected() to force it to resolve the
> selection state.
>
> selectionModel.setSelected(defaultMenuItem, true);
> selectionModel.isSelection(); // Force synchronous SelectionChangeEvent.
> selectionModel.addSelectionChangeHandler(...);
>
> Thanks,
> John LaBanca
> [email protected]
>
>
> On Wed, Feb 9, 2011 at 8:43 AM, Alejandro D. Garin <[email protected]>wrote:
>
>> Hi,
>>
>> I'm using a CellTable like a vertical menu Widget. i.e. the table is a
>> list of menu items (for navigation) that will
>> fire Places when the user click on any of the availables menues.
>>
>> Everything is OK except in the case that the application need to be
>> started at an specific menu item. I want to
>> select the menu but I don't want the SingleSelectionModel fires the
>> SelectionChangeEvent event because it was
>> already called, I just want the selection ON.
>>
>> The SingleSelectionModel#setSelected has no option to stop firing the
>> changEvent.
>> Am I missing something here? I think is good to have the chance to do not
>> fire the event!
>>
>> 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 [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.
>

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