Bernmeister
unread,Sep 15, 2010, 3:38:00 AM9/15/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Using GWT 2.1.0 M3 with the following code snippet:
@UiField ListBox myListBox;
. . .
Window.alert( "here" );
ChangeEvent.fireNativeEvent( Document.get().createChangeEvent(),
myListBox );
Window.alert( "there" );
I get "here" but not "there". Further, the event handler is also
subsequently called...
@UiHandler( "myListBox" )
void handleSelection( ChangeEvent changeEvent )
{
Window.alert( "everywhere" );
}
and I get "everywhere". This is strange as it seems as if the event
is fired and calls other code, but does not return to continue
execution (as "there" is not pumped out).
If I alter the event call to be
ChangeEvent.fireNativeEvent( Document.get().createChangeEvent(),
this );
where 'this' is an object which extends Composite, I get "here" AND
"there" but not "everywhere". That is the event handling code is not
triggered.
So what is the correct way to trigger an event such as a list box's
value being changed?
Thanks in advance,
Bernmeister.