将样式定义为p:clock元素 [英] Define style to a p:clock element in primefaces

查看:260
本文介绍了将样式定义为p:clock元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试把风格放在一个 p:clock元素类属性,但我收到以下消息:

I try to put style in a p:clock element with class attribute but I receive the following message:

java.lang.IllegalArgumentException:没有为属性类找到Setter。

java.lang.IllegalArgumentException: Setter not found for property class.

这是另一种定义方式样式到 p:clock 元素?

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;
}


推荐答案

c> class 。对于许多组件,您可以使用 styleClass ,但这里您必须这样做:

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;
}

这种方式在用户指南

这篇关于将样式定义为p:clock元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆