9 Replies Latest reply on Jul 11, 2007 9:12 AM by Florian Duehring

    Textfield looses focus during reRendering - how to avoid?

    Florian Duehring Newbie

      Hi,

      I have a problem with the focus after reRender a area.

      I have a a4j:outputPanel, which contains a table with a list of textfields:

      <a4j:outputPanel id="sumFields" >
       <h:dataTable value="#{bean.fields}" var="field">
       <h:column rendered="#{field.render}">
       <h:inputText value="#{field.value}">
       <a4j:support reRender="sumFields" event="onkeyup"/>
       </h:inputText>
       </h:column>
       </h:dataTable>
      </a4j:outputPanel>


      The goal is to render a column depending on an attribute (field.render). This attribute, in turn, is dependent from the input of the textField.

      Actually this works as expected, but when the panel is reRendered the current textfield looses the focus and I don't know how to avoid this....

      Any ideas?

      Thanks in advance...