public static void addThemedCSSResource ( String resource ) { Map < String , Object > viewMap = FacesContext . getCurrentInstance ( ) . getViewRoot ( ) . getViewMap ( ) ; @ SuppressWarnings ( "unchecked" ) List < String > resourceList = ( List < String > ) viewMap . get ( THEME_RESOURCE_KEY ) ; if ( null == resourceList ) { resourceList = new ArrayList < String > ( ) ; viewMap . put ( THEME_RESOURCE_KEY , resourceList ) ; } if ( ! resourceList . contains ( resource ) ) { resourceList . add ( resource ) ; } }
Registers a themed CSS file that needs to be included in the header of the HTML file .