我收到两条验证消息;一个正确,然后一个在表单顶部,当鼠标悬停在上面时,它会显示“项目阶段[开发]:未处理的消息”。如何隐藏此消息?
<h:outputLabel for="username">Please enter your username: </h:outputLabel>
<h:inputText id="username" value="#{user.id}" required="true">
<f:ajax event="blur" render="usernameMessage" />
</h:inputText>
<h:message id="usernameMessage" for="username" />
用户Bean.java
private static final long serialVersionUID = 1L;
@NotNull(message="The username can not be blank")
@Size(min=6, max=12, message="Please enter a valid username (6-12 characters)")
private String id;
public String getId() {
return id;
}
web.xml
<context-param>
<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
<param-value>true</param-value>
</context-param>