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. [pipenv]Warning: Python 3.7 was not found on your system…

    前置条件: 切换到pipfile文件所在目录gotest_official 问题描述: 使用pipenv install创建虚拟环境,报错 wangju@wangju-HP--G4:~/Desktop ...

  2. Summernote文本编辑器入门

    1.summernote是一个界面比较简洁美观的富文本编辑器. 2.文件导入(官方下载地址:http://summernote.org/) 下载回来的文件夹是这样的: 插件的核心文件放在 dist 这 ...

  3. 阶段3 2.Spring_08.面向切面编程 AOP_7 通用化切入点表达式

    下面配置了通用的表达式,,上面的四个就不用再配置那么长 索罗的切入点表达式了. 节省了每次都要写一长段表达式的过程 写在一个aop:aspect这个切面下面就只能当前切面用 写在切面里面 运行测试 挪 ...

  4. 【ZT】Enhancement Framework – Introduction

    Enhancement Framework – Introduction By Naimesh Patel | March 26, 2014 | Enhancement Implementation ...

  5. 自定义Spring-Boot @Enable注解

    Spring-Boot中有很多Enable开头的注解,通过添加注解来开启一项功能,如 其原理是什么?如何开发自己的Enable注解? 1.原理 以@EnableScheduling为例,查看其源码,发 ...

  6. matlab2012a过期问题解决办法(转载)

    转载:http://blog.sina.com.cn/s/blog_4a46812b0102x694.html   以前安装过Matlab2013a等高版本,发现自己win7 系统每次重启后,Matl ...

  7. mysql默认的存储引擎是什么?它们的区别有哪些?mysql中索引有哪些?

    1.mysql默认引擎 mysql-5.1版本之前默认引擎是MyISAM,之后是innoDB 2.关系 MyISAM是非集聚引擎,支持全文索引;不支持事务;它是表级锁;会保存表的具体行数. innoD ...

  8. python3 selenuim PC端使用chrome模拟手机进行H5自动化

    情况说明:初次在做PC端使用chrome进行H5自动化测试时,以为和app端自动化一样使用click()就可以对按钮进行点击,找了好几天也没有找到解决方法,有些人说是工程问题,有些人是使用微信进行H5 ...

  9. 【神经网络与深度学习】caffe+VS2013+Windows无GPU快速配置教程

    首先来一波地址: happynear大神的第三方caffe:http://blog.csdn.net/happynear/article/details/45372231 Neil Z大神的第三方ca ...

  10. 【VS开发】【图像处理】Pleora推出iPORT CL-U3外置抓帧器

    全球领先的高性能视频接口产品供应商Pleora科技公司近日宣布推出可将Camera Link®摄像头转化为USB3Vision™摄像头的首个产品iPORT CL-U3外置抓帧器,树立了另一个行业里程碑 ...