You should be able to bubble custom events using the attachHandler and
fireEvents method on a widget.
I am still trying to conceive an example where you would need a custom event.
Most of the widely used events for all widgets have handlers defined.
I have not personally tried attaching a cus
In the @UIHandler example, you have a direct reference to the button
and you register a handler directly on the event source.
I was wondering if there's the possibility that some custom event goes
up in the UI hierarchy.
To illustrate, in this situation I could perfectly bind a handler to
the wid
for listening on events on your widget you can define UiHandler or Attach /
Add handlers
for example, if you have a button defined in your UIBinder
Hello
now if you want to listen on click event of this button, you can do either
of these two operations
@UiHandler("button1")
public void OnButton
I come from the Flex/JS/Tapestry worlds and a technique commonly used
is to attach listeners to certain events expecting they'll will go up
like a bubble through the component hierarchy. Actually if I'm not
wrong this kind of behavior also occurs with native hardware events in
GWT.
A typical examp
what sort of events are you looking to capture? You can create custom events
and register those events with the eventBus. When ever that event occurs all
handlers would receive a notification and you can take necessary action.
Thanks
Ashwin
--
You received this message because you are subscrib
Hello,
I was wondering, is it possible to bubble up a custom event through
the widget hierarchy?
The EventBus solution seems great but in some cases I'd like to catch
certain events related to the "current context" that's usually given
by the UI.
Thanks..!
--
You received this message because