Talk is cheap show me the code. L.T.

JSF – Ajax handle

Eger projenizde, <f:ajax/> eventlerini kullandı iseniz, zaman zaman bu request ve response’ları handle etmek isteyebilirsiniz.

[codesyntax lang="javascript" strict="yes"]

<h:head>
   <h:outputScript library="javax.faces" name="jsf.js"/>
</h:head>

function handleAjax(data) {
   var status = data.status;

   switch (status) {
      case "begin":
         // This is the start of the AJAX request.
         break;

      case "complete":
         // This is invoked right after ajax response is returned.
         break;

      case "success":
         // This is invoked right after successful processing of ajax response and update of HTML DOM.
         break;
   }
}

// Setup the statusUpdate function to hear all events on the page
jsf.ajax.addOnEvent(handleAjax);

[/codesyntax]


( 19624 )

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>