javascript - PrimeFaces.ab function -


cant seem find documentation primefaces.ab function

primefaces.ab({source:'signupform:signupbutton'}); return false; 

can me code above meant do? has been written against onclick of submit button.

the primefaces.ab function shortcut function primefaces.ajax.ajaxrequest.

    //ajax shortcut     ab: function(cfg, ext) {         return primefaces.ajax.ajaxrequest(cfg, ext);     } 

the primefaces.ajax.ajaxrequest can asynchronous or synchronous. ajaxrequest uses ajaxutils, handles send, process, response, , update.

primefaces.ajax.ajaxrequest = function(cfg, ext) {     cfg.ext = ext;      if(cfg.async) {         return primefaces.ajax.ajaxutils.send(cfg);     }     else {         return primefaces.ajax.queue.offer(cfg);     } } 

passing cfg (configuration) object primefaces.ajax.ajaxutils.send(cfg), cfg object has:

  • cfg.global: boolean value used trigger p:ajaxstatus if it's true.
  • cfg.onstart: called when request send.
  • cfg.async: boolean value, if call asynchronous or not.
  • cfg.source: can client id or element defined keyword
  • cfg.formid: if explicit form defined, or parent source
  • cfg.resetvalues
  • cfg.ignoreautoupdate
  • cfg.fragmentid: used process of components
  • cfg.fragmentupdate
  • cfg.event: behaviour event, click or change
  • cfg.params: request params
  • cfg.partialsubmit: if partial submit enabled, there components process partially
  • cfg.onerror: called when request had error status.
  • cfg.onsuccess: called when request had success status.
  • cfg.oncomplete: called when request completed.

note: came explanation based on understanding of source code.

also can refer answer, might helpful.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -