4 Replies Latest reply on Sep 17, 2009 7:51 PM by e2venu

    A4J support

      i have an issue with an input text component using A4J support to rerender a page after an onblur event, when i tab out it rerenders and i lose the focus to the next component which is an icon for a modal window, i tried everthing from the focus attribute, focus() function to forcefully set focus when its onfocus on the icon but no avail, the focus is getting cleared by the a4j support re-render, anyone know a fix for this? i see some bug tickets on this similar topic on the jboss jira sites.

        • 1. Re: A4J support
          nbelaevski

          Hi,

          You can set focus programmatically using JavaScript code defined in "oncomplete" attribute of a4j:support.

          • 2. Re: A4J support

            yes i tried that too but the issue is the a4j ajax update of the dom is slower than the client side focus function and hence clearing out my focus..i figured out a hack to set timeout on the focus call after 300 ms so the dom updates first from ajax and then i focus, seems to work for now.

            • 3. Re: A4J support
              nbelaevski

              Strange problem... can you please post page code snippets?

              • 4. Re: A4J support

                i must add that i am tabbing using the tab key with tabindexes set and when i tab over the onblur of a text box event if kicking off a a4j call for validation and does a re-render, when the re-render updates the DOM i lost focus when tabbing, thus the hack described above.