6 Replies Latest reply on Jun 18, 2007 5:46 AM by david gs

    Problem with IE 6 and a4j:form - t:tree2

    Daniel Knapp Newbie

      I am using a4j:form to perform ajax requests when expanding a node of t:tree2. In Firefox everything works fine, while in IE I do alsways receive an exception. The cause is that some hidden fields (menuForm%3A_link_hidden_ / org.apache.myfaces.tree.NAV_COMMAND) do not seem to be submitted in IE, while they are in Firefox. Can someone help me or is this a bug within IE ?

      Configuration:

      Tomahawk 1.1.3
      MyFaces 1.1.5
      Ajax4Jsf 1.1.0
      Tomcat 5.5

      Code-Snippet:

      <a4j:form id="menuForm" ajaxSubmit="true" ajaxSingle="true" reRender="treePanel" ignoreDupResponses="true">
      <a4j:log hotkey="L" popup="true" level="ALL"/>
      <a4j:outputPanel ajaxRendered="true" layout="inline" id="treePanel">
      <t:tree2 binding="#{treeBacker.tree}" id="serverTree" showRootNode="true" showNav="true" value="#{treeBacker.treeModel}" var="node" varNodeToggler="t" clientSideToggle="false">
      <f:facet name="desktop">
      <h:panelGroup>
      <t:graphicImage value="/resources/images/desktop.png" border="0"/>
      <a4j:commandLink rendered="#{node.urlNode}" styleClass="#{t.nodeSelected ? 'nodeSelected':'node'}" actionListener="#{t.setNodeSelected}">
      <h:outputLink value="#{node.url}" target="#{node.target}">
      <h:outputText value="#{node.description}" styleClass="nodeFolder"/>
      </h:outputLink>
      </a4j:commandLink>
      </h:panelGroup>
      </f:facet>
      </t:tree2>
      </a4j:outputPanel>
      </a4j:form>


      Debug-Console from Firefox

      debug[12:00:01,733]: NEW AJAX REQUEST !!! with form :menuForm
      debug[12:00:01,733]: parameter menuForm with value menuForm
      debug[12:00:01,733]: Start XmlHttpRequest
      debug[12:00:01,733]: Reqest state : 1
      debug[12:00:01,733]: QueryString: AJAXREQUEST=_viewRoot&autoScroll=&menuForm=menuForm&menuForm=menuForm&menuForm%3A_link_hidden_=&serverTree%3Aorg.apache.myfaces.tree.NAV_COMMAND=0%3A1&navItemId=&menuForm%3A_idcl=menuForm%3AserverTree%3A0%3A1%3At2g&jsf_sequence=8&javax.faces.ViewState=rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAE4cHQAEi92aWV3cy93ZWxjb21lLmpzcA%3D%3D&
      debug[12:00:01,733]: Reqest state : 1
      debug[12:00:01,937]: Reqest state : 2
      debug[12:00:01,937]: Reqest state : 3
      debug[12:00:01,952]: Reqest state : 3
      debug[12:00:01,952]: Reqest state : 3
      debug[12:00:01,952]: Reqest state : 3
      debug[12:00:01,952]: Reqest state : 4
      debug[12:00:01,952]: Reqest end with state 4
      debug[12:00:01,952]: Response with content-type: text/xml;charset=UTF-8

      Debug-Console from IE 6

      debug[12:01:21,827]: NEW AJAX REQUEST !!! with form :menuForm
      debug[12:01:21,843]: parameter menuForm with value menuForm
      debug[12:01:21,858]: Start XmlHttpRequest
      debug[12:01:21,858]: Reqest state : 1
      debug[12:01:21,874]: QueryString: AJAXREQUEST=_viewRoot&autoScroll=&menuForm=menuForm&menuForm=menuForm&menuForm%3A_link_hidden_=&serverTree%3Aorg.apache.myfaces.tree.NAV_COMMAND=null&navItemId=&menuForm%3A_idcl=null&jsf_sequence=3&javax.faces.ViewState=rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAEzcHQAEi92aWV3cy93ZWxjb21lLmpzcA%3D%3D&
      debug[12:01:22,937]: Reqest state : 2
      debug[12:01:22,937]: Reqest state : 3
      debug[12:01:22,937]: Reqest state : 4
      debug[12:01:22,952]: Reqest end with state 4
      debug[12:01:22,968]: Header Ajax-Error-Message not found, search in

        • 2. Re: Problem with IE 6 and a4j:form - t:tree2
          Andrew Apprentice

          I have the same problem with ALL tomahawk controls with a4j:form ajaxSubmit="true" and IE6:

          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105646

          • 3. Re: Problem with IE 6 and a4j:form - t:tree2
            Andrew Apprentice

            FYI: a temporary hack (this will probably cause adverse behaviors):

            <a4j:form ajaxSubmit="true"
             onsubmit="window.oamClearHiddenInput = function() {};">
            




            • 4. Re: Problem with IE 6 and a4j:form - t:tree2
              david gs Newbie

              Still hapening the same to me. When I click on any commandLink the page submit (not expected using AJAX) and turns blank.
              I'm using data table and datascroller from Tomahawk. I've tried different versions.

              MyFaces (1.1.4, 1.1.5 or 1.1.6)
              Tomahawk (1.1.4, 1.1.5 or 1.1.6)
              Tomahawk-Sandbox (1.1.5 or 1.1.6)
              Ajax4Jsf 1.1.0 or 1.1.1
              Tomcat 5.5
              IE 6 or 7

               <a4j:form ajaxSubmit="true" eventsQueue="adm_usuarios" reRender="adm_usuarios,eliminar,detalleUsuario,detalleFamilias" id="adm_usuarios">
               <t:dataTable
               id="data"
               forceId="true"
               styleClass="scrollerTable"
               headerClass="standardTable_Header"
               footerClass="standardTable_Header"
               rowClasses="standardTable_Row1,standardTable_Row2"
               columnClasses="standardTable_Column"
               rowOnMouseOver="this.style.backgroundColor='#A5CBFF'"
               rowOnMouseOut="this.style.backgroundColor=''"
               rowOnClick="seleccionTabla(this)"
               var="row"
               rowStyleClass="#{usuariosListaBean.seleccion.idUsuario == row.idUsuario ? 'filaSeleccionada' : ''}"
               value="#{usuariosListaBean.data}"
               preserveDataModel="false"
               rows="5"
               rowIndexVar="indexId"
               rowId="#{indexId}"
               sortedColumnVar="sortCol"
               binding="#{usuariosListaBean.dataUI}"
               sortColumn="#{usuariosListaBean.sort}"
               sortAscending="#{usuariosListaBean.ascending}"
               preserveSort="true">
               <t:columns id="columns" value="#{usuariosListaBean.columnHeaders}" var="columnHeader">
               <f:facet name="header">
               <t:commandSortHeader columnName="#{columnHeader.dato}" arrow="false" immediate="true">
               <f:facet name="ascending">
               <t:graphicImage value="img/ascending-arrow.gif" rendered="true" border="0"/>
               </f:facet>
               <f:facet name="descending">
               <t:graphicImage value="img/descending-arrow.gif" rendered="true" border="0"/>
               </f:facet>
               <h:outputText value="#{msg[columnHeader.etiqueta]}" />
               </t:commandSortHeader>
               </f:facet>
               <t:outputText value="#{usuariosListaBean.columnValue}" style="width:#{usuariosListaBean.columnWidth}">
               <s:convertDateTime type="both" dateStyle="short" />
               </t:outputText>
               </t:columns>
               <t:column style="display:none;visibility:hidden" headerstyle="display:none;visibility:hidden">
               <t:commandLink id="sel" immediate="true" actionListener="#{usuariosListaBean.seleccionActionListener}">
               <t:updateActionListener value="#{row.idUsuario}" property="#{usuariosListaBean.seleccion.idUsuario}" />
               </t:commandLink>
               </t:column>
               </t:dataTable>
              
               <h:panelGrid columns="1" styleClass="scrollerTablePie" columnClasses="standardTable_ColumnCentered">
               <t:dataScroller
               id="scroll_1"
               for="data"
               fastStep="10"
               pageCountVar="pageCount"
               pageIndexVar="pageIndex"
               styleClass="scroller"
               paginator="true"
               paginatorMaxPages="9"
               paginatorTableClass="paginator"
               paginatorActiveColumnStyle="font-weight:bold;"
               immediate="true">
               <f:facet name="first">
               <t:graphicImage url="img/arrow-first.gif" border="1"/>
               </f:facet>
               <f:facet name="last">
               <t:graphicImage url="img/arrow-last.gif" border="1"/>
               </f:facet>
               <f:facet name="previous">
               <t:graphicImage url="img/arrow-previous.gif" border="1"/>
               </f:facet>
               <f:facet name="next">
               <t:graphicImage url="img/arrow-next.gif" border="1" />
               </f:facet>
               <f:facet name="fastforward">
               <t:graphicImage url="img/arrow-ff.gif" border="1"/>
               </f:facet>
               <f:facet name="fastrewind">
               <t:graphicImage url="img/arrow-fr.gif" border="1"/>
               </f:facet>
               </t:dataScroller>
              
               <t:dataScroller id="scroll_2"
               for="data"
               rowsCountVar="rowsCount"
               displayedRowsCountVar="displayedRowsCountVar"
               firstRowIndexVar="firstRowIndex"
               lastRowIndexVar="lastRowIndex"
               pageCountVar="pageCount"
               pageIndexVar="pageIndex"
               immediate="true">
               <h:outputFormat value="#{msg['usuarios.paginacion.info']}" styleClass="scroller">
               <f:param value="#{rowsCount}"/>
               <f:param value="#{displayedRowsCountVar}"/>
               <f:param value="#{firstRowIndex}"/>
               <f:param value="#{lastRowIndex}"/>
               <f:param value="#{pageIndex}"/>
               <f:param value="#{pageCount}"/>
               </h:outputFormat>
               </t:dataScroller>
               </h:panelGrid>
               </a4j:form>
              


              • 5. Re: Problem with IE 6 and a4j:form - t:tree2
                david gs Newbie

                Got a blank page in Firefox 2.0.0.4 too.

                • 6. Re: Problem with IE 6 and a4j:form - t:tree2
                  david gs Newbie

                  Resolved by changing:

                  <managed-bean-scope>request</managed-bean-scope>
                  

                  to
                  <managed-bean-scope>session</managed-bean-scope>
                  

                  in manager beans config.