Activities are objects in charge of the interactions on a given part of the UI, in a given time. They are started/stopped by their relative ActivityManager
s in response of URL changes (i.e., PlaceChangeEvent
s).
An ActivityManager
is in charge of a given area of the UI, a display (of course, if you have multiple managers; the whole UI - the body
- in the other case). Such managers internally hold a reference to the AcceptsOneWidget
they own (the one you pass from a call to ActivityManager.setDisplay()
method), as well as an EventBus
object (the one you pass from an ActivityManager
instantiation).
So...
containerWidget
is the display. It could be aRootLayoutPanel.get()
, or a specific panel of the whole UI (must be anAcceptsOneWidget
one). You attach your view, to it.- The
EventBus
of thestart()
method is aResettableEventBus
wrapper of the original one holded by theActivityManager
. This way, when the activity is stopped, any handler attached to such bus, will be automatically de-registered. You generally want to rely on this bus, rather than using the global one.