• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with error messages not displaying

Keith Galligos
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i searched the forum for this problem i found a few posts but none seemed to fit exactly what is happening with my app. I have paired my application down to one field on the page and a few java statements to remove the clutter. I am using jdk 1.5/Seam/Hibernate set up. I am have some java experience but very new to seam. I am trying to display an error message.....doesn't seem like much of a task. When I have <h:messages/> at the top of the xhtml the message appears at the top of the displayed page. When i remove <h:messages/> i get no message displayed. In the console i get the message: 11:13:53,236 INFO [lifecycle]
WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
sourceId=null[severity=(INFO 0), summary=(Billing Address cannot be removed), detail=(Billing Address cannot be removed)]. I think the issue is that the sourceid is null and is not presenting the id or key of the message to the xhtml so it can be paired up with the message i have defined.

I am embarrased to say exactly how long i have fooled with this problem. I would certainly appreciate any help. I am new to the forum i guess i will paste the code into this message below instead of attach. There is not much to see:

public void validateFFSCompany() {
facesMessages.addToControl("test", "Billing Address cannot be removed");

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
<f:facet name="header">
<hutputText value="Search Events"/>

<fieldset style="width: 750px">

<hutputLabel for="test" value="Test 1: "/>
<h:inputText id="test" value="#{mailingAddress.line1}" size="35" maxlength="35" required="false"/>
<h:message for="test" styleClass="message"/>

<div class="spacer">
<rich:spacer width="1" height="20"/>

<h:commandButton value="Submit" id="submit" action="addFFSCompany" rendered="#{ffsCompany.id == 0}"/>
<h:commandButton value="Edit" id="edit" action="editFFSCompany" rendered="#{ffsCompany.id != 0}"/>
<s:button value="Cancel" id="cancel" action="cancelModifyFFSCompany"/>

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic