}
}
private void processNextHandler(FaceletContext ctx, FaceletHandler handler, UIComponent parent) throws IOException {
if (handler instanceof ComponentHandler) {
ComponentHandler componentHandler = (ComponentHandler) handler;
ComponentConfig componentConfig = componentHandler.getComponentConfig();
String componentType = componentConfig.getComponentType();
if (isUIParameter(componentType)) {
FacesContext facesContext = ctx.getFacesContext();
UIComponent component = (UIComponent) facesContext.getApplication().createComponent(componentType);
componentHandler.setAttributes(ctx, component);
if (parent instanceof ClientBehaviorHolder) {
ClientBehaviorHolder clientBehaviorHolder = ((ClientBehaviorHolder) parent);
Map<String, List<ClientBehavior>> clientBehaviors = clientBehaviorHolder.getClientBehaviors();
String eventName = getEventName();
if (eventName == null) {
eventName = clientBehaviorHolder.getDefaultEventName();
}
if (eventName != null) {
List<ClientBehavior> eventClientBehaviors = clientBehaviors.get(eventName);
for (ClientBehavior clientBehavior : eventClientBehaviors) {
if (clientBehavior instanceof ComponentControlBehavior) {
((ComponentControlBehavior) clientBehavior).getChildren().add(component);
}
}
}
}
componentHandler.applyNextHandler(ctx, component);
}
}
}