0 Replies Latest reply on May 9, 2007 2:53 PM by Bram Biesbrouck

    a4j validation tutorial example bug

    Bram Biesbrouck Newbie

      Hi all,

      I have some problems with the a4j validation, suggested in the seam tutorial:

      <s:decorate id="countryDecoration" template="edit.xhtml">
       <ui:define name="label">Country:</ui:define>
       <h:inputText value="#{location.country}" required="true">
       <a:support event="onblur" reRender="countryDecoration"/>
       </h:inputText>
       </s:decorate>
      


      If I use this piece of code in my app, and I use a <h:commandButton ... type="submit"/> to submit the form, when I press enter while in the inputbox, the application crashes. The problem is probably because the form gets submitted (and redirects), while the ajax validation is still in progress.

      This is the second time I encounter this kind of behaviour. My initial workaround was to disable ajax validation, but it's really user friendly and I'd like to use it.

      Any solutions?

      b.