• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with error messages not displaying

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html">
<rich:panel>
<f:facet name="header">
<h:outputText value="Search Events"/>
</f:facet>

<h:form>
<fieldset style="width: 750px">

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

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

<rich:toolBar>
<rich:toolBarGroup>
<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"/>
</rich:toolBarGroup>
</rich:toolBar>
</h:form>


</rich:panel>
</ui:composition>
 
reply
    Bookmark Topic Watch Topic
  • New Topic