2 Replies Latest reply on Nov 6, 2013 11:46 AM by saini.sushant

    aj4:status invoked only once.

    saini.sushant

      Hi I am running into different issues migrating from Richfaces 3.3.3. to 4.3.2. The latest issues is that tooltip inside datatable stops working after pagination or sorting. Now I am trying to resolve this issue by using <a4j:status onstart="alert('hi')" >. i have tried putting this at different locations in the page. From outside the form, to around the form to inside the form but in scenarios, it is invoked only during first Ajax request.

      After that it stops working. What I am doing wrong?

       

       

       

      <h:panelGrid >

       

        <h:form id="buildingSearchForm" prependId="false">

              <ui:include src="building/buildingsearch-body.xhtml" />

          </h:form>

          <a4j:status onstart="alert('hi')">

          </a4j:status>

          </h:panelGrid>

        • 1. Re: aj4:status invoked only once.
          saini.sushant

          I found out something more about this weird bahavior. Actually onstar is invoked multiple on every ajax untill an ajax request which results in rearraging of the datatable data like sorting or pagination.

           

          So if the ajax does not change the data in datatable, a4j:status is invoked multiple times but as soon as there is a single sorting or pagination request, it stops working.

          • 2. Re: aj4:status invoked only once.
            saini.sushant

            Issue Resolved!!! i cannot believe something so small can cause so many issues. basically I observed that even the smallest JS calls like oncomplete="alert(''hi)" were not working on my page. Also sorting, pagination was causing JS to not bee invoked, the behavior was little odd. a4j:status was working only once before you sort or paginate. Tooltip was not working inside datatable after sorting or paginating.

             

            All these issues are resolved after I replaced <h:commandbutton> with <a4j:commandbutton> throughout the page. it is strange but works for me .