2 Replies Latest reply on Apr 9, 2008 4:43 AM by liumin hu

    Where could I find the document of object A4j.AJAX?

    liumin hu Master

      hi,

      I am searching a way to show the rich:messages in a rich:modalpanel. With jQuery(document).ready(function(){}), I can do it without ajax. In the developer guide of richfaces, there is A4J.AJAX.onError or A4J.AJAX.onExpired . Does it exist something like A4J.AJAX.onUpdated? and where could I find the document of this object?

      Thanks in advance

        • 1. Re: Where could I find the document of object A4j.AJAX?
          Sergey Smirnov Master

          the oncomplete attribute equals to what you expect from "A4J.AJAX.onUpdated"

          • 2. Re: Where could I find the document of object A4j.AJAX?
            liumin hu Master

            hi sergey,
            oncomplete is good for the operation special of every single ajax request, but It is not suit of what i am waiting for. I need somewhere to centralize the display of all faces-messages created by ANY ajax request. If i use oncomplete, i need add the js function to show the modalpanel in oncomplete of EVERY ajax call,that is repetitive. actually i use a a4j:poll to send a Additional ajax request, then use the oncomplete of this request, but i don't like this solution very much.

            What do you think of?

            here is my code with jquery.ready

            <h:inputText id="maximumSeverity" value="#{facesContext.maximumSeverity.ordinal}" />
            

             jQuery(document).ready(function() {
             if($('maximumSeverity').value>0){
             Richfaces.showModalPanel('modalerror',{});
             }
             });