1 Reply Latest reply on May 17, 2007 2:52 AM by sergeysmirnov

    a4j:support event=

    fernando_jmt

      Hi.
      I have a page which contains something like:

      ...
       <h:inputText id="firstName" value="#{userInstance.firstName}"
       maxlength="80" tabindex="4" styleClass="input">
       <a4j:support event="onkeyup" reRender="userListId" requestDelay="1000"
       actionListener="#{userList.search}"/>
       </h:inputText>
      
      
      
       <h:inputText id="lastName" value="#{userInstance.lastName}"
       maxlength="80" tabindex="5" styleClass="input">
       <a4j:support event="onkeyup" reRender="userListId" requestDelay="1000"
       actionListener="#{userList.search}"/>
       </h:inputText>
      ..
      



      If I write something in the inputTexts, then the backing bean is called. But, if I press Alt+tab in order to jump to another application in the desktop, I can see that the ajax request is sent to server, but I did not write anything in such input fields (it also happens, if the inputs are empty).
      My question is: Is this the correct behaviour? or am I missing some configuration?


      Thanks in advance.

        • 1. Re: a4j:support event=

          a4j:support uses the available events to bind with. If browser does not invoke onkeyup when you press Alt-Tab, do not expect that browser magically starts to do so when a4j:support is mentioned.
          In you case, you need to add additional a4j:support event="onblur" if you want to produce ajax request not only when the text in the field is changed, but when the input focus is out.
          However, if you want to have a request only if field value is changed, but not on any onblur, use a4j:support event="onchange"