Client Side Validation not displaying message in Growl

UI Components for JSF
Post Reply
andyf
Posts: 3
Joined: 17 Feb 2017, 10:32

17 Feb 2017, 12:51

Client Side Validation not displaying message in Growl

Hi,

I am tying to use the primefaces client side validation framework. Most of it is working correctly, but for some reason the validatorMessage doesn't display in my growl. When I just have the server side validation it appears fine. I have added a standard message and this also appears fine, it just won't appear in the growl.

My growl is defined as:

Code: Select all

<p:growl id="errorMsg" showDetail="true" sticky="true" autoUpdate="true" widgetVar="growlErrorMsg" />
A snippet of my xhtml is:-

Code: Select all

							<div class="field">
								<p:outputLabel for="Amt1"
									rendered="#{MyWebPage.amt1.isRendered()}"
									value="Amt: "
									binding="#{MyWebPage.amt1Prompt}" >
								<span class="required">*</span>
								</p:outputLabel>
								<p:inputText id="Amt1" maxlength="10"
									validatorMessage="Input must match this pattern: -ZZZZZZZZZ9"
									value="#{flowScope.amt}"
									binding="#{MyWebPage.amt1}"
									disabled="#{MyWebPage.isDisabledAmt1('')}"
									styleClass = "numeric" >
									<f:converter converterId="zero" />
									<f:validateRegex pattern="^-?([0-9]{1,10})$" />
									<p:clientValidator />
								</p:inputText>
								<p:message for="Amt1" />
							</div>
The code above includes the <p:message> which displays successfully. Without this, the field error is still highlighted but no message appears. Not sure whether it has any bearing but this is on a dialog.

I am using Primefaces 6.0, JSF 2.1.13 (Mojarra), and running on Tomcat 8.5.4.

Any guidance would be much appreciated.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests