private void handleFacesBehaviorRenderer(FacesConfigImpl facesConfig, Set<Class<?>> classes)
{
for (Class<?> clazz : classes)
{
FacesBehaviorRenderer facesBehaviorRenderer
= (FacesBehaviorRenderer) clazz.getAnnotation(FacesBehaviorRenderer.class);
if (facesBehaviorRenderer != null)
{
String renderKitId = facesBehaviorRenderer.renderKitId();
//RenderKit renderKit;
if (log.isLoggable(Level.FINEST))
{
log.finest("addClientBehaviorRenderer(" + renderKitId + ", "
+ facesBehaviorRenderer.rendererType() + ", "
+ clazz.getName() + ")");
}
org.apache.myfaces.config.impl.digester.elements.RenderKitImpl renderKit =
(org.apache.myfaces.config.impl.digester.elements.RenderKitImpl)
facesConfig.getRenderKit(renderKitId);
if (renderKit == null)
{
renderKit = new org.apache.myfaces.config.impl.digester.elements.RenderKitImpl();
renderKit.setId(renderKitId);
facesConfig.addRenderKit(renderKit);
}
org.apache.myfaces.config.impl.digester.elements.ClientBehaviorRendererImpl cbr =
new org.apache.myfaces.config.impl.digester.elements.ClientBehaviorRendererImpl();
cbr.setRendererType(facesBehaviorRenderer.rendererType());
cbr.setRendererClass(clazz.getName());
renderKit.addClientBehaviorRenderer(cbr);
}
}
}