10 Replies Latest reply on Sep 27, 2007 4:55 PM by Herman Chung

    Validation facesmessages not showing up.

    Herman Chung Newbie

      Hi all,

      I tried to switch from Seam 1.2 to Seam 2.0 beta, I am using JBoss AS 4.2.0GA and ran into some problems regarding displaying validation messages. My validation messages keeps on getting enqueued and not displayed after I left required fields empty and submit.

      My JSF form

       <fieldset class="organization">
       <f:facet name="afterInvalidField">
       <s:div styleClass="errors">
       <h:outputLabel for="organizationName"
       <h:inputText id="organizationName"
       size="40" styleClass="text"/>
       <s:decorate for="organizationName"/>
       <h:outputLabel for="website"
       <h:inputText id="website"
       size="40" styleClass="text"/>
       <s:decorate for="website"/>
       <h:commandButton value="#{messages['wizard.next']}" action="#{organizationAction.validate}" styleClass="submit"/>
       <s:button view="/p/organizationList.xhtml" propagation="end"
       value="#{messages['button.cancel']}" styleClass="submit"/>

      After I submit the form with all fields blank, I keep getting this error message in the console...

      2007-08-14 09:53:45,453 INFO [javax.enterprise.resource.webcontainer.jsf.lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=j_id44:website[severity=(ERROR 2), summary=(valeur requise), detail=(valeur requise)]
      sourceId=j_id44:organizationName[severity=(ERROR 2), summary=(valeur requise), detail=(valeur requise)]

      I tried using <h:messages/> instead, and it worked but messages are displayed on top instead... I tried running seam-booking example it works but I don't see anything different that I am doing... I didn't have this problem when I was using Seam 1.2..

      Any help will be appreciated... thanks!