// If the wrapped renderer has the ability to listen to component system events, then invoke the event
// processing on the wrapped renderer. This is necessary when wrapping the Mojarra ScriptRenderer or
// StylesheetRenderer because they extend ScriptStyleBaseRenderer which attempts to add the component
// associated with the specified event as a resource on the view root.
if (wrappedRenderer instanceof ComponentSystemEventListener) {
ComponentSystemEventListener wrappedListener = (ComponentSystemEventListener) wrappedRenderer;
wrappedListener.processEvent(event);
}
else {
logger.debug("Wrapped renderer=[{0}] does not implement ComponentSystemEventListener", wrappedRenderer);
}
}