2 Replies Latest reply on Jan 16, 2008 10:38 AM by Ben Hanney

    a4j:form Using ajaxSubmit not working correctly in IE 6

    Ben Hanney Newbie

      Hi,

      During final testing of my app I've noticed that a4j:forms
      with ajaxSubmit=true don't seem to work correctly in IE6.

      The form is submitted but the action methods of htmlCommandLinks in the
      form never seem to get called?

      The same a4j:forms work perfectly in Firefox, Safari + IE 7.

      If I set ajaxSubmit to false the code works in IE6 and the action methods
      get called.

      This seems to be the same problem as:

      http://jira.jboss.org/jira/browse/AJSF-29

      I'm using JSF RI 1.2_07-b03-FCS with Facelets 1.1.13 and Tomahawk 1.16.

      Is this a bug or am I missing something?

      Cheers,
      Ben

        • 1. Re: a4j:form Using ajaxSubmit not working correctly in IE 6
          Ilya Shaikovsky Master

          why do you need to use ajax-ed form instead of just simple form + a4j:command* controls?

          Show your page to reproduce this error,.

          • 2. Re: a4j:form Using ajaxSubmit not working correctly in IE 6
            Ben Hanney Newbie

            I have a complex ajax page with various commandLinks whose rendered state changes depending on the user's interaction with the page.

            Using a4j:commandLink wasn't working due to the changing rendered states so I switched to using a4j:form and a4j:htmlCommandLinks as per the RichFaces documentation and everything worked as expected in Firefox, Safari and IE 7 with ajaxSubmit=true;

            Here's a trivial example that shows the problem:

            <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:a4j="http://richfaces.org/a4j">
            
            <a4j:region>
            <div id="test">
            
             <a4j:form id="testForm"
             ajaxSubmit="true"
             reRender="testForm">
             <div>IE6 Ajax Submit Test</div>
            
             <a4j:htmlCommandLink id="testLink" action="#{JsfBean.ieTest}"
             immediate="true">
             Test Link
             </a4j:htmlCommandLink>
             </a4j:form>
            </div>
            </a4j:region>
            
            </ui:composition>
            


            and the action method is just:

            public void ieTest() {
             log().info("Test Method was called!");
            }
            


            With ajaxSubmit=true the ieTest() method is called in Firefox, Safari + IE 7 but not in IE 6. If ajaxSubmit is set to false the action method is called in all the browsers.

            Let me know if you need any more info.

            Cheers,
            Ben