2 Replies Latest reply on Apr 12, 2009 9:24 PM by anthon.r

    Integration Problem with Post-Redirect-Get Pattern

      Specs: JSF 1.2 RI, RichFaces 3.3.0.GA

      Hi,

      I'm implementing a Post-Ridirect-Get pattern using JSF PhaseListener.

      The problem I'm facing with RichFaces is I don't know how to detect if the request is an Ajax request (which only needs to reRender some parts of the View) or if it is an ordinary request (triggered by non-ajax components such as h:commandButton).

      Here what I want to do:

      if( request is an ajax request )
      {
      do not redirect, let RichFaces update a part of the view
      }
      else // ( request is triggered by ordinary command button )
      {
      redirect by action (handled by my PostRedirectGet phaseListener)
      }

      My phaseListener has no way to distinguish ajax request from ordinary request, that's why my phase listener always renders a redirect response which defeats the purpose of ajax.

      Thanks a lot.