Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
964 views
in Technique[技术] by (71.8m points)

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

I created an user interface with a form to get information from user. When I submit the form, it prints the following warning in the server log:

INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=j_idt7:j_idt11[severity=(ERROR 2), summary=(j_idt7:j_idt11: Validation Error: Value is not valid), detail=(j_idt7:j_idt11: Validation Error: Value is not valid)]

I tried to solve it, however I didn't understand how. How is this problem caused and how can I solve it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

As to the warning referring an undisplayed Validation Error: Value is not valid message, this means that you've somewhere a <h:selectXxx> component such as <h:selectOneMenu> without an associated <h:message> and therefore JSF is not able to display faces messages about conversion/validation errors directly in the UI.

In order to fix the particular warning, just add a <h:message>:

<h:selectOneMenu id="foo" ... />
<h:message for="foo" />

Note that when you're ajax-submitting the form using <f:ajax>, then you should not forgot to include the messages in the ajax-update. To start with, use render="@form" to update the entire form.

As to the concrete validation error problem which is mentioned in the message, head to the following answer: Validation Error: Value is not valid.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...