I am currently using some kind of modified Observer-Pattern to simulate an event bus in Wicket 1.4.
My pages act as an observable observer, because my components do not know each other and are reused in different combinations on several pages. Whenever one component receives an Ajax event, which can affect other components, it calls a method on its page with the event object and target ajax. The page calls a similar method for all components that have registered for this kind of event, and each component can decide, based on the provided event-object, if and how it should respond and can join the target.
The same can be archived using a wicket visitor. I donโt know which one is better, but I think itโs basically a matter of taste.
source share