2 Replies Latest reply on Apr 9, 2008 8:16 PM by Adam Jenkins

    Ajax problem, ReRendered being called before Ajax updates mo

    Bigyan Basnet Newbie

      Hi,

      I have a problem. I am using richfaces ajax functionality to update the model beans but the ajax methods to update the model are being called AFTER the components are re-rendered.

      To be specific my class that implements the ExtendedDataModel has the

      public void walk(FacesContext context, DataVisitor visitor, Range range, Object argument)

      The walk() method always gets called before the Ajax call updates the model.



      <a4j:commandLink immediate="true" action="#{recognitionDataModel.doSort}" reRender="recognitionView"/>
       <f:param name="sortField" value="REFERENCE_ID" />
      </a4j:commandLink>



      So the sort method of the dataModel is called but only AFTER the table has been rerendered so the sorting is always a step behind.

      I have the same problem with other components that have methods to render/encode them.

      Any help would be greatly appreciated. Thanks