docs: protected UIComponent createComponent(FaceletContext ctx)
      {
          if (_componentBuilderHandlerDelegate != null)
          {
              // the call to Application.createComponent(FacesContext, Resource)
              // 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 (PhaseId.RESTORE_VIEW.equals(faces.getCurrentPhaseId()))
              {
                  if (!ve.isReadOnly(faces.getELContext()))
                  {
                      try
                      {
                          // force reset it is an easy and cheap way to allow "binding" attribute to work on 
                          // view scope beans or flow scope beans (using a transient variable)
                          ve.setValue(faces.getELContext(), null);
                      }
                      catch (Exception e)
                      {
                          // ignore
                      }
                  }
              }
              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());
                  }
                  
                  if (c.getChildCount() > 0 || c.getFacetCount() > 0)
                  {
                      // In this case, this component is used to hold a subtree that is generated
                      // dynamically. In this case, the best is mark this component to be restored
                      // fully, because this ensures the state is correctly preserved. Note this
                      // is only necessary when the component has additional children or facets,
                      // because those components requires an unique id provided by createUniqueId(),
                      // and this ensures stability of the generated ids.
                      c.getAttributes().put(DefaultFaceletsStateManagementStrategy.COMPONENT_ADDED_AFTER_BUILD_VIEW,
                                            ComponentState.REMOVE_ADD);
                      
                      if (FaceletViewDeclarationLanguageBase.isDynamicComponentNeedsRefresh(ctx.getFacesContext()))
                      {
                          FaceletViewDeclarationLanguageBase.resetDynamicComponentNeedsRefreshFlag(
                                  ctx.getFacesContext());
                          FaceletCompositionContext mctx = FaceletCompositionContext.getCurrentInstance(ctx);
                          if (mctx.isUsingPSSOnThisView())
                          {
                              FaceletViewDeclarationLanguage.cleanTransientBuildOnRestore(faces);
                          }
                          else
                          {
                              FaceletViewDeclarationLanguageBase.activateDynamicComponentRefreshTransientBuild(faces);
                          }
                          //
                          // Mark top binding component to be dynamically refreshed. In that way, facelets algorithm
                          // will be able to decide if the component children requires to be refreshed dynamically 
                          // or not.
                          c.getAttributes().put(
                                  FaceletDynamicComponentRefreshTransientBuildEvent.
                                      DYNAMIC_COMPONENT_BINDING_NEEDS_REFRESH,
                                  Boolean.TRUE);
                      }
                  }
              }
          }
          else
          {
              // According to the, spec call the second alternative with null rendererType gives
              // the same result, but without the unnecesary call for FacesContext.getCurrentInstance().
              // Saves 1 call per component without rendererType (f:viewParam, h:column, f:selectItem, ...)
              // and it does not have any side effects (the spec javadoc mentions in a explicit way
              // that rendererType can be null!).
              /*
              if (this._rendererType == null)
              {
                  c = app.createComponent(this._componentType);
              }
              else
              {*/
                  c = app.createComponent(faces, this._componentType, this._rendererType);
              //}
          }
          return c;
      }