问题
I try to put style in a p:clock element
with class attribute but I receive the following message:
java.lang.IllegalArgumentException: Setter not found for property class.
That's another way to define style to a p:clock
element?
XHTML:
<p:clock pattern="HH:mm" class="clock"/>
CSS:
.clock
{
border-radius: 0px !important;
}
回答1:
Never use class
. For many components you'd use styleClass
instead, but here you have to do it like this:
<p:clock pattern="HH:mm"/>
.ui-clock{
border-radius: 0px !important;
}
This way of doing it is described in the User Guide under "skinning".
来源:https://stackoverflow.com/questions/25366554/define-style-to-a-pclock-element-in-primefaces