Code example for EventBus

Methods: register

0
@SuppressWarnings("serial") 
public class AggregateView extends CustomComponent { 
 
	public AggregateView() { 
 
		EventBus bus = new EventBus();
 
		FormLayout layout = new FormLayout();
 
		FirstComponent first = new FirstComponent(bus);
 
		SecondComponent second = new SecondComponent();
 
		bus.register(second);
 
		layout.addComponent(first);
		layout.addComponent(second);
 
		setCompositionRoot(layout);
	}