开发者

Facesmessage severity

If I have a FacesMessage Object, how do I find severity. FOr eg: getSeverity()......

Any help would b开发者_StackOverflow社区e greatly appreciated. Thanks


Simply look in the FacesContext instance for the list of messages, then get the severity for a specific message:

Iterator<FacesMessage> msgs = FacesContext.getCurrentInstance().getMessages();
for (FacesMessage msg : msgs) {
    msg.getSeverity();
}


For those kind of questions, you need to consult the API documentation of the class in question. The one for FacesMessage is located here. Now, scan the list of available methods to see for something useable. And see.. Yes, there's a getSeverity() method!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜