The PrimeFaces.ab function is a shortcut function for PrimeFaces.ajax.AjaxRequest.

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

The PrimeFaces.ajax.AjaxRequest can be asynchronous or synchronous. The AjaxRequest uses the AjaxUtils, which handles all send, process, response, and 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 a cfg (configuration) object to the PrimeFaces.ajax.AjaxUtils.send(cfg), this cfg object has:

  • cfg.global: a boolean value used to trigger p:ajaxStatus if it's a true.
  • cfg.onstart: to be called when the request is to be send.
  • cfg.async: a boolean value, where if this call is asynchronous or not.
  • cfg.source: can be a client id or an element defined by this keyword
  • cfg.formId: if an explicit form is defined, or it would look into a parent source
  • cfg.resetValues
  • cfg.ignoreAutoUpdate
  • cfg.fragmentId: used for the process of the components
  • cfg.fragmentUpdate
  • cfg.event: behaviour event, like click or change
  • cfg.params: request params
  • cfg.partialSubmit: if partial submit is enabled, there are components to process partially
  • cfg.onerror: to be called when the request had an error status.
  • cfg.onsuccess: to be called when the request had a success status.
  • cfg.oncomplete: to be called when the request is completed.

Note: I came up with this explanation based on my understanding of the source code.

Also you can refer to this answer, might be helpful.

http://stackoverflow.com/questions/23031582/primefaces-ab-function

PrimeFaces ab function的更多相关文章

  1. [ES6] 06. Arrow Function =>

    ES6 arrow function is somehow like CoffeeScirpt. CoffeeScript: //function call coffee = -> coffee ...

  2. 【JavaScript吉光片羽】遭遇IE8

    最初对做兼容性的认知只停留在UI层面,但其实UI层面都还好,因为毕竟你可以直接看得见现象,更为重要的是在JavaScript层面,因为这个部分涉及到功能性,前者最多是体验性的问题.下面扯一下这几天遇到 ...

  3. JS中 call() 与apply 方法

    1.方法定义 call方法: 语法:call([thisObj[,arg1[, arg2[,   [,.argN]]]]]) 定义:调用一个对象的一个方法,以另一个对象替换当前对象. 说明: call ...

  4. 多功能前台交互效果插件superSlide

    平时我们常用的"焦点图/幻灯片""Tab标签切换""图片滚动""无缝滚动"等效果要加载n个插件,又害怕代码冲突又怕不兼容 ...

  5. Javascript中call和apply的区别和用法

    JavaScript中有一个call和apply方法,其作用基本相同,但也有略微的区别.其实就是更改对象的内部指针,即改变对象的this指向的内容.这在面向对象的js编程过程中有时是很有用的.call ...

  6. 《ES6基础教程》之 Call 方法和 Apply 方法

    <script type="text/javascript"> // Call方法: // 语法:call(thisObj[,arg1,arg2,...,argN]) ...

  7. JS中的call()和apply()方法

    1.方法定义 call方法: 语法:call([thisObj[,arg1[, arg2[,   [,.argN]]]]]) 定义:调用一个对象的一个方法,以另一个对象替换当前对象. 说明: call ...

  8. call()与apply()

    1.obj1.method1.call(obj2,argument1,argument2) call的作用就是把obj1的方法放到obj2上使用 2. add 来替换 sub,add.call(sub ...

  9. 个人对sort()排序方法中比较函数一直很混乱,今日理清

    需求:使用随机数来打印出0-10,并排序. 代码: var a = new Array();var testArray = function() { while (1) { var b = parse ...

随机推荐

  1. SpringMVC restful风格下载文件,文件后缀被截掉

    原文:https://blog.csdn.net/wisdomhealth/article/details/78400421 @RequestMapping("/file/{filename ...

  2. 微信小程序UI学习

    1.大纲: 2.flex的布局: 3.相对定位和绝对定位: position: relative   相对定位 position: absolute  绝对定位

  3. vim开发配置

    需求:使用vim开发python,可以进行简单配置 cd 到用户宿主目录下 vim .vimrc 粘贴以下内容: 版本一: set encoding=utf-8"去掉vi的一致性" ...

  4. mysqli实现增删改查(转)

    1.面向对象 在面向对象的方式中,mysqli被封装成一个类,它的构造方法如下: __construct ([ string $host [, string $username [, string $ ...

  5. CSS进阶学习

    5种主流浏览器及内核 IE  trident Chrome webkit/blink Firefox  gecko Opera presto 3%-5% Safari webkit css引入三种方式 ...

  6. Linux man及echo的使用

    学习目标: 通过本实验掌握man和echo两个命令的用法. 实验步骤: 1.通过man查询ls的详细用法,后面可以跟哪些参数,每个参数的作用.这里主要查找如何禁止ls彩色结果输出. 2.把查找到的参数 ...

  7. 深入理解java:4. 框架编程

    了解 Servlet 和 Filter Servlet(即servlet-api.jar) 是 J2EE 最重要的一部分,有了 Servlet 你就是 J2EE 了,J2EE 的其他方面的内容择需采用 ...

  8. java中string , StringBuffer , StringBuilder 区别

    1.String String变量的值不能改变,如果要改变String变量的值,虚拟机首先会遍历方法区中的字符串常量,如果存在需要的值,则虚拟机直接把此常量值的地址分配给String变量,如果不存在这 ...

  9. Atomic实现原子性源码分析:CAS(比较并交换)、Unsafe类

    1.CAS: 比较并交换(Compare And Swap),是Unsafe类中的一条CPU系统原语,原语的执行必须是连续的,在执行过程中不允许被中断,即CAS是一条CPU的原子指令,不会造成数据不一 ...

  10. Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.

    Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance.  Cause: org ...