Programmatic access to inline Styles where name is separated with dashes
Here is shown how to use styles in CamelC开发者_C百科ase, but how to use styles with a dash in its name? Valid Java method name can't have dashes in it (at least eclipse shows syntax error).
Style defined in template:
.menu-inactive{ background-color: grey; }
You can use CssResource.ClassName
for valid CSS class names that are invalid Java identifiers.
interface MyCssResource extends CssResource {
@CssResource.ClassName("menu-inactive")
String menuInactive();
}
精彩评论