private boolean ensureExistBootsfacesComponent ( UIViewRoot root , FacesContext context ) { Map < String , Object > viewMap = root . getViewMap ( ) ; // check explicit js request if ( viewMap . get ( RESOURCE_KEY ) != null ) return true ; // check explicit css request if ( viewMap . get ( THEME_RESOURCE_KEY ) != null ) return true ; // check explicit css request if ( viewMap . get ( EXT_RESOURCE_KEY ) != null ) return true ; // check referenced bsf request if ( findBsfComponent ( root , C . BSF_LIBRARY ) != null ) return true ; return false ; }
Check if there is almost one bootsfaces component in page . If yes load the correct items .