if (null == (renderKitId = application.getDefaultRenderKitId())) {
renderKitId = RenderKitFactory.HTML_BASIC_RENDER_KIT;
}
RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder
.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
FacesContext context = new InitFacesContext(application,
portletContext);
RenderKit renderKit = renderKitFactory.getRenderKit(context,
renderKitId);
renderKit
.addRenderer(
UIViewRoot.COMPONENT_FAMILY,
UIViewRoot.COMPONENT_TYPE,
richFacesHelper.getViewRootRenderer());
context.release();
}
} catch (FacesException e) {
throw new BridgeException("JSF Initialization error", e);
}
}