This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

difference between h:messages & h:message

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
im trying to print out the error message using h:message but it is not shown. From the log i have the following statement:
INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=appt[severity=(ERROR 2), summary=(date and time not entered.), detail=(date and time not entered.)]

However, when i use h:messages to display the error message, it is shown.

Why is this so??

-thanks.
 
Saloon Keeper
Posts: 26281
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
h:message is a specific message for a specific control. h:messages is a message container.

The log entry you're getting is saying that you (or some software) entered a message into the messages container, but no tag pulled it out and displayed that message. Which is basically exactly what the log entry says.

If I'm reading it correctly, adding a tag "<h:message for="appt"/>" should provide a way to display that message.
 
lynn fann
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have the following line on my jsp page.

<h:inputText id="appt" value="#{myBean.dateSelect}"/>
<h:message for="appt"/>

in my managed bean i have the following
FacesMessage message = new FacesMessage();
message.setSummary("date and time not entered.");
message.setDetail("date and time not entered.");
context.addMessage("appt", message);
return null;

with these lines, i have the above stated error. What/where have i gone wrong?

-Thanks.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic