runtimeConfig.resetManagedBeansNotReaddedAfterPurge();
}
private void configureRenderKits()
{
RenderKitFactory renderKitFactory = (RenderKitFactory)FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
FacesConfigData dispenser = getDispenser();
for (String renderKitId : dispenser.getRenderKitIds())
{
Collection<String> renderKitClass = dispenser.getRenderKitClasses(renderKitId);
if (renderKitClass.isEmpty())
{
renderKitClass = new ArrayList<String>(1);
renderKitClass.add(DEFAULT_RENDER_KIT_CLASS);
}
//RenderKit renderKit = (RenderKit) ClassUtils.newInstance(renderKitClass);
RenderKit renderKit = (RenderKit) ClassUtils.buildApplicationObject(RenderKit.class, renderKitClass, null);
for (Renderer element : dispenser.getRenderers(renderKitId))
{
javax.faces.render.Renderer renderer;
Collection<ClientBehaviorRenderer> clientBehaviorRenderers = dispenser.getClientBehaviorRenderers (renderKitId);
try
{
renderer = (javax.faces.render.Renderer) ClassUtils.newInstance(element.getRendererClass());
}
catch (Throwable e)
{
// ignore the failure so that the render kit is configured
log.log(Level.SEVERE, "failed to configure class " + element.getRendererClass(), e);
continue;
}
renderKit.addRenderer(element.getComponentFamily(), element.getRendererType(), renderer);
// Add in client behavior renderers.
for (ClientBehaviorRenderer clientBehaviorRenderer : clientBehaviorRenderers) {
try {
javax.faces.render.ClientBehaviorRenderer behaviorRenderer = (javax.faces.render.ClientBehaviorRenderer)
ClassUtils.newInstance (clientBehaviorRenderer.getRendererClass());
renderKit.addClientBehaviorRenderer(clientBehaviorRenderer.getRendererType(), behaviorRenderer);
}
catch (Throwable e) {
// Ignore.
if (log.isLoggable(Level.SEVERE)) {
log.log(Level.SEVERE, "failed to configure client behavior renderer class " +
clientBehaviorRenderer.getRendererClass(), e);
}
}
}
}
renderKitFactory.addRenderKit(renderKitId, renderKit);
}
}