2 Replies Latest reply on Jul 27, 2012 2:02 PM by lysy78

    RF 4.2.2 ajax misunderstanding?

    lysy78

      Hello,

       

      I have simple code snippet, shown below:

       

       

      <a4j:outputPanel id="onBlur2">

           <h:panelGroup rendered="#{manager.flag}">

                <h:form>

                     <h:inputText value="#{container.name}">

                          <a4j:ajax event="blur" render="out2"/>

                     </h:inputText>

                     <h:outputText value="#{container.name}" id="out2" />

                </h:form>

           </h:panelGroup>

      </a4j:outputPanel>

       

       

      Input field is rendered when manager.flag is set ot true.

       

      The problem with this code appears when:

      1. The flag is false at the begining and then it is changed to true (input text field is rendered)

      2. I leave input text field for the first time

       

      IMHO output text should be rendered (blur event). But nothing happens when I leave field for the first time. When I do this for the second time  and so on, everything works fine.

       

      So question is: what is going on when input text loses focus for the first time?

       

      thanks in advance

      Hubert