AnsweredAssumed Answered

Custom action : how to intercept the validation phase of JSF

Question asked by zomurn on Dec 1, 2008
Latest reply on Dec 3, 2008 by zomurn

I have a custom action like this :

<!– Etat traiter –>
         <action id="traiter_action_id">
               <permission allow="true">Write</permission>
               <param name="nodeRef">#{actionContext.nodeRef}
               <param name="actionId">traiter_action_id</param>

The problem is that when I click on the action, the associated action-listener is situated in the "Invoke Application" phase of JSFrequest  life cycle.
The problem is that in this phase we can't add FacesMessage to the FacesContext because, just at the end of this action listener method, the response.sendRedirect() instruction is executed and so a new FacesContext is created resulting in that the FacesMessage is then lost !
How to intercept the previous phase (I need to be in validation phase so as to be able to throw error message in web client).