protected static void addClass2Component ( UIComponent c , String aclass ) { Map < String , Object > a = c . getAttributes ( ) ; if ( a . containsKey ( "styleClass" ) ) { a . put ( "styleClass" , a . get ( "styleClass" ) + " " + aclass ) ; } else { a . put ( "styleClass" , aclass ) ; } }
Adds a CSS class to a component in the view tree . The class is appended to the styleClass value .