public static void setEnabled ( Element element , boolean enabled ) { element . setPropertyBoolean ( "disabled" , ! enabled ) ; setStyleName ( element , "disabled" , ! enabled ) ; }
It s enough to just set the disabled attribute on the element but we want to also add a disabled class so that we can style it .