Hi,
Please help me understand what is the best way of event handling in
nested panel structures. what i mean is, suupose you have something
like this:
// fires event BusinessEvent1
// handles event BusinessEvent2
class MyWidget extends Composite{
}
// fires event BusinessEvent2
// handlers event BusinessEvent1
class AnotherPanel extends Composite{
}
class InnerPanel extends VerticalPanel {
MyWidget widget1
}
class OuterPanel extends FlowPanel {
InnerPanel panel1;
AnotherPanel panel2;
}
// Interested in logout/login/destroy events
class Application{
OuterPanel panel;
}
What is the best way to Orchestrate these events ??
I can think of below alternatives:
1.Have each intermediate class extend respective handlers and pass
fire and handle the event back and forth
(Panels have to implements the Handlers and worry about passing the
events back and forth)
2.Pass the HandlerManager of the OuterPanel as the constructor
argument to the InnerPanel ( there will be one panel event handler and
a local event handler, just too much to worry about)
3. Have a Global HandlerManager (Event bus concept), (which I think
defeats the Delegation of resource by the parent concept)
Am sure there is a better and elegant way to do this.
Let me know what you guys think.
Thanks for the help.
--
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.