WARNING: FacesMessage(s) have been enqueued, but may not have been displayed

只谈情不闲聊 提交于 2019-12-30 18:05:28

问题


In my application, faces messages are not rendered on UI, not sure what is exactly causing this issue. In the server log I see this:

WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.

What is the reason for such kind of situations?


回答1:


Make sure that you have placed <h:message for="..."> or <h:messages> tag in your page, see also JSF 2 message and messages example




回答2:


Another reason why a error message is not displayed could be, that the error occurs in the RENDER_RESPONSE phase of the JSF lifecycle. In this scenario a warning may be logged which says something like “FacesMessage(s) have been enqueued, but may not have been displayed“.

The reason in this case is, that in the render response phase the component tree is traversed and each component is rendered successively. When an error occurs after the message component finished rendering, it is not possible to add another message to it.

In this case a possible solution would be to place the message component at the end of the component tree. See also this blog.



来源:https://stackoverflow.com/questions/10113498/warning-facesmessages-have-been-enqueued-but-may-not-have-been-displayed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!