Define style to a p:clock element in primefaces

 ̄綄美尐妖づ 提交于 2019-12-23 20:24:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!