3 Replies Latest reply on Nov 30, 2010 10:20 PM by Florian Petersen

    Action method executed too late

    Florian Petersen Newbie

      Hi everybody,


      i have implemented a query as subclass of EntityQuery.
      As the getResultList method is executed in multiple jsf lifecycle phases, i overwrote getResultList to cache the query results and use a condition to ensure the underlying query is only executed once.


      The bad about it is that when an action method is executed, it is executed after the first time the query is executed (getResultList is triggered first  in the Apply Req Values phase - via ui:repeat value attribute, action method is executed in Invoke App phase). So the update to the database which is made in the action method is not reflected in the view immediately. It needs a browser refresh.


      Does anyone have a smart idea to solve this problem?
      Thanks a lot, best regards
      Flo