I see, that in JSF most of the standard components that mapped to HTML tags, e.g. <h:commandButton/>
, have attributes class
and styleClass
. But no matter, which one I use, both is rendered as class
attributes in markup.
So why there are two attributes with the same purpose?
There is simply no class
attribute in JSF components.
From the doc, attribute styleClass
:
Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.
The styleClass
is simply converted as class
in the rendered HTML.
More info :