Hi,
I am back with more Handler questions. This is currently the most
opaque GWT topic for me.
I am building a Composite widget that will have at least a Grid and a
Button. The Grid will act a little like a ListBox in that one or more
rows can be "selected". I am not using a ListBox because I need
formatted "Columns" of row content.
The button will be enabled or disabled depending on the number of
selected rows. If the button is enabled then there must be at least
one selected Grid row. If the button is clicked then I want to fire a
ChangeEvent.
Ok, I have done a little homework and I have asked about
ClickListeners in the past so I have some small understanding of
ClickListeners, ChangeListeners are a different beast.
I want to add a ChangeListener but I am not seeing how to fire the
Change event.
I am registering ChangeEvents by:
public HandlerRegistration addChangeHandler(ChangeHandler handler)
{
return addDomHandler(handler, ChangeEvent.getType());
}
I pulled that straight from another Discussions post. I know that I
could use addHandler instead of addDomHandler. I have seen that
addDomHandler "sinks" the event and addHandler does not. Should I
care if the event(s) are "sunk"?
When the button is clicked I want to fire a change event. Here I lose
it. I am looking at using:
fireEvent(GwtEvent<ChangeEvent.getType()>);
but Eclipse reports a typo on the closing ">". I am also looking at:
ChangeEvent.fireNativeEvent(nativeEvent, this);
but to what should I set "nativeEvent"? Should I use this
"fireNativeEvent" method at all?
All the best,
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---