The @ListenersFor annotation allows you to register a component/renderer as a listener for multiple system events.
@ListenersFor({
@ListenerFor(systemEventClass=PostAddToViewEvent.class),
@ListenerFor(systemEventClass=BeforeRenderEvent.class)
})
public class MyComponent extends UIComponentBase implements ComponentSystemEventListener {
/*
* @param event the event to handle.
*/
public void processEvent(ComponentSystemEvent event) throws AbortProcessingException {
}
}