@ Override protected UIComponent createComponent ( FacesContext context , String id ) { String componentType = getComponentType ( ) ; if ( componentType == null ) { throw new NullPointerException ( "componentType" ) ; } if ( _binding != null ) { Application application = context . getApplication ( ) ; ValueBinding componentBinding = application . createValueBinding ( _binding ) ; UIComponent component = application . createComponent ( componentBinding , context , componentType ) ; component . setId ( id ) ; component . setValueBinding ( "binding" , componentBinding ) ; setProperties ( component ) ; return component ; } UIComponent component = context . getApplication ( ) . createComponent ( componentType ) ; component . setId ( id ) ; setProperties ( component ) ; return component ; }
Create a UIComponent . Abstract method getComponentType is invoked to determine the actual type name for the component to be created .