5 Replies Latest reply on May 27, 2010 8:33 AM by m m

    How to call js on complete every ajax request ?

    m m Newbie

      I have rich:messages in container, that i need to show if maximumSeverity != null.

      In a couple of commandLinks i have something like that :

       

      <a4j:commandLink .... oncomplete="if (#{facesContext.maximumSeverity!=null}) {jQuery('#messages').show();}"
      
      <div id="messages">
       <!-- <a4j:outputPanel ajaxRendered="true"> -->
       <rich:messages globalOnly="true" infoClass="messages_info" errorClass="messages_error" warnClass="messages_warn" fatalClass="messages_fatal" />
      <!-- </a4j:outputPanel> -->
       </div>
      

       

      How to make call my oncomplete js code after every request completed GLOBALLY ?

      I know that <a4j:outputPanel ajaxRendered="true"> can be rerendered after requests... but i think that i can't put js inside <a4j:outputPanel... >