📜  RichFaces Rich:NotifyMessage

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

RichFaces

用于显示FacesMessages。此组件建立在< rich:notify >的顶部。

样式类和皮肤参数

注意与普通班。因为对于每个JSF消息仅呈现一个通知。

下表包含notifyMessage的样式类和相应的外观参数。

Class Function Skin Parameters Mapped CSS properties
.rf-ntf-inf This class defines styles for an informative message. generalTextColor color
.rf-ntf-wrn This class defines styles for a warning notifications. No skin parameters.
.rf-ntf-err This class defines styles for a error notifications. No skin parameters.
.rf-ntf-ftl This class defines styles for a fatal notifications. No skin parameters.
.rf-ntf-inf .rf-ntf-ico, .rf-ntf-wrn .rf-ntf-ico, .rf-ntf-err .rf-ntf-ico, .rf-ntf-ftl .rf-ntf-ico These classes define style for notification icon based on severity of notification message. No skin parameters.

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

JSF页面

// rich-notify-message.xhtml




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

输出: