我是PrimeFaces的新手,我无法显示简单的验证消息。下面是我简单的JSF页面。有人能指出我正确的方向,因为我做错了吗?
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<f:view contentType="text/html">
<h:head>
<meta content='text/html; charset=UTF-8' http-equiv="Content-Type" />
<title>Add Tournament</title>
</h:head>
<h:body>
<h:form>
<p:layout fullPage="true" >
<p:layoutUnit position="center">
<f:view>
<div align="center">
<h1><h:outputText value="Create/Edit Tournament"/></h1>
<p:panel>
<p:messages globalOnly="false" id="msgs" autoUpdate="true"/>
<p:panelGrid columns="2">
<p:outputLabel value="TournamentName:" for="tournamentName" />
<p:inputText required="true" id="tournamentName" value="#{tournamentProfile.tournament.tournamentName}" title="TournamentName" requiredMessage="Tournament name is required." />
<p:outputLabel value="" for="addTournament" />
<p:commandButton validateClient="true" update="msgs" id="addTournament" value="Add Tournament" />
</p:panelGrid>
</p:panel>
</div>
</f:view>
</p:layoutUnit>
</p:layout>
</h:form>
</h:body>
</f:view>
</html>