且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JSF使用EL来测试全局消息的存在

更新时间:2023-12-04 17:36:34

不需要自定义EL函数

尝试

rendered="#{not empty facesContext.messageList}"


编辑

我自己还没有尝试过,但是请尝试

Haven't tried it myself , but try

rendered="#{not empty facesContext.messageList(null)}"

一个主意...

 rendered="#{not facesContext.validationFailed and not empty facesContext.messageList}"