use of javax.faces.event.SystemEvent in project liferay-faces-bridge-impl by liferay.
the class ApplicationCompatImpl method subscribeToJSF2SystemEvent.
protected void subscribeToJSF2SystemEvent(ConfiguredSystemEventListener configuredSystemEventListener) {
try {
ClassLoader classLoader = TCCLUtil.getThreadContextClassLoaderOrDefault(getClass());
@SuppressWarnings("unchecked") Class<? extends SystemEvent> systemEventClass = (Class<? extends SystemEvent>) classLoader.loadClass(configuredSystemEventListener.getSystemEventClass());
@SuppressWarnings("unchecked") Class<? extends SystemEventListener> systemEventListenerClass = (Class<? extends SystemEventListener>) classLoader.loadClass(configuredSystemEventListener.getSystemEventListenerClass());
SystemEventListener systemEventListener = systemEventListenerClass.newInstance();
logger.debug("Subscribing UIViewRootBridgeImpl for systemEventClass=[{0}] systemEventListener=[{1}]", systemEventClass, systemEventListener);
subscribeToEvent(systemEventClass, UIViewRootBridgeImpl.class, systemEventListener);
} catch (Exception e) {
logger.error(e);
}
}
Aggregations