Warning for messages enqueud but not displayed

UI Components for JSF
Post Reply
vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

26 Mar 2012, 20:48

Hi ,

I am getting some warning whenever i do any action on page like navigate etc and it doesnt allow the request to be completed . The warning is :

WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=loginform:j_idt32:userName[severity=(ERROR 2), summary=(loginform:j_idt32:userName: Validation Error: Value is required.), detail=(loginform:j_idt32:userName: Validation Error: Value is required.)]
sourceId=loginform:j_idt32:password[severity=(ERROR 2), summary=(loginform:j_idt32:password: Validation Error: Value is required.), detail=(loginform:j_idt32:password: Validation Error: Value is required.)]
[26/03/12 14:32:41:137 EDT] 00000027 renderkit I WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=loginform:j_idt32:userName[severity=(ERROR 2), summary=(loginform:j_idt32:userName: Validation Error: Value is required.), detail=(loginform:j_idt32:userName: Validation Error: Value is required.)]
sourceId=loginform:j_idt32:password[severity=(ERROR 2), summary=(loginform:j_idt32:password: Validation Error: Value is required.), detail=(loginform:j_idt32:password: Validation Error: Value is required.)]

I have 2 fileds on screen which are marked as required true . When i make remove required it works fine .

The action i am trying to do is :

Code: Select all

<h:selectOneMenu value="#{language.localeCode}" onchange = "submit()" style = "padding-top:10"
					valueChangeListener="#{language.countryLocaleCodeChanged}" label = "Language: ">
   					<f:selectItems value="#{language.countriesInMap}" /> 
   				</h:selectOneMenu>
But it does not allow to submit the page and get error for required fields.

Using PF3.2 , Mojarra 2.1.4

vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

26 Mar 2012, 21:03

[/code]<h:panelGrid id="grid" columns="3" style="margin-bottom:5px;" cellspacing = "10">
<!-- <h:outputLabel for="userName" value="#{msg.username}" /> -->
<pe:requiredLabel id ="name1" for="userName" value="User Name" style = "font-weight:bold" />
<p:inputText id="userName" required="true"
value="#{login.userName}" title="#{component.valid ? '' : 'User Name can not be empty'}">
<p:watermark for="userName" value="USER NAME" />
</p:inputText>

<!-- <h:outputLabel for="password" value="#{msg.password}" style = "font-weight:bold" /> -->
<pe:requiredLabel for="password" value="Password"/>
<p:password id = "password" required="true" value="#{login.password}" feedback="false" title="#{component.valid ? '' : 'PassWord can not be empty'}"/>
<p:watermark for="password" value="PASSWORD" />
</h:panelGrid>

<p:commandButton
value="#{msg.login}" action="#{login.validateUser}" update = "grid" style = "margin-left:85%" onclick="PrimeFaces.cleanWatermarks();" oncomplete="PrimeFaces.showWatermarks(); "/>
<pe:tooltip global="true" position="left center" targetPosition="right center" forSelector=".ui-state-error"/>

Code: Select all


This are the required fieds on page .

vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

27 Mar 2012, 06:28

Help will be really appreciated on this as i am just unable to figure out the reason for this . Any hints alos will be very helpful

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

27 Mar 2012, 08:51

I assume you do have something like a messages or growl component in your page?

vineet
Posts: 387
Joined: 14 Oct 2011, 23:40

28 Mar 2012, 00:11

Yes i do have <p:messages> in the page .

Lyrionus
Posts: 60
Joined: 31 Aug 2011, 09:09

28 Mar 2012, 08:55

Well since you have a <p:messages>, do they show you the actual errors? The value is required and such... if so there is nothing to worry about. I've got that warning message alot of times aswell but the messages still get shown.
JSF 2.0
Primefaces 3.2
Tomcat 7.0

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests