Results 1 to 2 of 2
  1. #1
    kaga01 is offline Member
    Join Date
    Sep 2010
    Rep Power

    Default Error message does not display

    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=""
    <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="#{ == 0}"/>
    <h:commandButton value="Edit" id="edit" action="editFFSCompany" rendered="#{ != 0}"/>
    <s:button value="Cancel" id="cancel" action="cancelModifyFFSCompany"/>


  2. #2
    madnaelo is offline Member
    Join Date
    Dec 2010
    Rep Power


    Give your form an id: like
    <h:form id='ffsCompanyForm'>

    and in java file,
    facesMessages.addToControl("ffsCompanyForm:test", "Billing Address cannot be removed");

    This should help?

Similar Threads

  1. Replies: 13
    Last Post: 03-20-2010, 02:03 AM
  2. Error Message????
    By Cubba27 in forum New To Java
    Replies: 11
    Last Post: 11-21-2009, 03:46 PM
  3. Display Message Without Throwing Exception
    By kailashchandra in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 09-27-2008, 10:05 AM
  4. Display success message in same page when submit button is clicked
    By am17mu in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-29-2008, 11:56 AM
  5. error message on jsp
    By sandor in forum Web Frameworks
    Replies: 1
    Last Post: 04-11-2007, 03:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts