📜  RichFaces Rich:Message

📅  最后修改于: 2021-01-08 12:44:54             🧑  作者: Mango

RichFaces

此组件用于呈现消息。我们可以自定义此消息的外观。工具提示属性用于提供有关消息的更多信息。

该组件与JSF < h:message >相同,带有一些其他属性。

样式类和皮肤参数

Class (selector) Class (selector)
Function
Skin Parameters Mapped CSS properties
.rf-msg It is used to define styles for the message itself. generalFamilyFont
generalSizeFont
font-family
font-size
.rf-msg-err It is used to define styles for an error message. errorColor color
.rf-msg-ftl It is used to define styles for a fatal message. errorColor color
.rf-msg-inf It is used to define styles for an information message. generalTextColor color
.rf-msg-wrn It is used to define styles for a warning message. warningTextColor color
.rf-msg-ok It is used to define styles for a basic OK message. generalTextColor color
.rf-msg-sum, .rf-msg-det These classes define styles for the summary or details of a message. No skin parameters.

在下面的示例中,我们正在实现< rich:message >组件。本示例包含以下文件。

JSF文件

// rich-message.xhtml




Rich Message 













托管豆

// User.java

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
@ManagedBean
@RequestScoped
public class User {
String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

输出: