// is delegated because we don't have here the required Resource instance
return _componentBuilderHandlerDelegate.createComponent(ctx);
}
UIComponent c = null;
FacesContext faces = ctx.getFacesContext();
Application app = faces.getApplication();
if (_delegate.getBinding() != null)
{
ValueExpression ve = _delegate.getBinding().getValueExpression(ctx, Object.class);
if (this._rendererType == null)
{
c = app.createComponent(ve, faces, this._componentType);
}
else
{
c = app.createComponent(ve, faces, this._componentType, this._rendererType);
}
if (c != null)
{
c.setValueExpression("binding", ve);
if (!ve.isReadOnly(faces.getELContext()))
{
ComponentSupport.getViewRoot(ctx, c).getAttributes().put("oam.CALL_PRE_DISPOSE_VIEW", Boolean.TRUE);
c.subscribeToEvent(PreDisposeViewEvent.class, new ClearBindingValueExpressionListener());
}
}
}
else
{
if (this._rendererType == null)
{
c = app.createComponent(this._componentType);
}
else
{
c = app.createComponent(faces, this._componentType, this._rendererType);
}
}
return c;
}