PrimeFaces ab function
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的更多相关文章
- [ES6] 06. Arrow Function =>
ES6 arrow function is somehow like CoffeeScirpt. CoffeeScript: //function call coffee = -> coffee ...
- 【JavaScript吉光片羽】遭遇IE8
最初对做兼容性的认知只停留在UI层面,但其实UI层面都还好,因为毕竟你可以直接看得见现象,更为重要的是在JavaScript层面,因为这个部分涉及到功能性,前者最多是体验性的问题.下面扯一下这几天遇到 ...
- JS中 call() 与apply 方法
1.方法定义 call方法: 语法:call([thisObj[,arg1[, arg2[, [,.argN]]]]]) 定义:调用一个对象的一个方法,以另一个对象替换当前对象. 说明: call ...
- 多功能前台交互效果插件superSlide
平时我们常用的"焦点图/幻灯片""Tab标签切换""图片滚动""无缝滚动"等效果要加载n个插件,又害怕代码冲突又怕不兼容 ...
- Javascript中call和apply的区别和用法
JavaScript中有一个call和apply方法,其作用基本相同,但也有略微的区别.其实就是更改对象的内部指针,即改变对象的this指向的内容.这在面向对象的js编程过程中有时是很有用的.call ...
- 《ES6基础教程》之 Call 方法和 Apply 方法
<script type="text/javascript"> // Call方法: // 语法:call(thisObj[,arg1,arg2,...,argN]) ...
- JS中的call()和apply()方法
1.方法定义 call方法: 语法:call([thisObj[,arg1[, arg2[, [,.argN]]]]]) 定义:调用一个对象的一个方法,以另一个对象替换当前对象. 说明: call ...
- call()与apply()
1.obj1.method1.call(obj2,argument1,argument2) call的作用就是把obj1的方法放到obj2上使用 2. add 来替换 sub,add.call(sub ...
- 个人对sort()排序方法中比较函数一直很混乱,今日理清
需求:使用随机数来打印出0-10,并排序. 代码: var a = new Array();var testArray = function() { while (1) { var b = parse ...
随机推荐
- 自动轮询的recycleView
import android.content.Context; import android.support.v7.widget.RecyclerView; import android.util.A ...
- Python中的IndentationError解决
用Python .join拼接SQL的时候遇到一个错误:TypeError: cannot concatenate 'str' and 'dict' objects,检查了一下确认是join了两个类型 ...
- EasyPHP(php集成环境)下载 v5.4.6官方安装版
EasyPHP版本:12.1(32位) PHP版本:5.4.6 MYSQL版本:5.5.27 APACHE版本:2.4.2 下载地址请点击
- redis的LRU策略理解
首先看下serverCron中,服务器每次循环执行的时候,都会刷新server.lrulock. int serverCron(struct aeEventLoop *eventLoop, long ...
- GitHub Port 443 Refused
最近在本地Github上传和更新远程仓库的时候老是显示 GitHub - failed to connect to github 443 windows/ Failed to connect to g ...
- 微信小程序<一>
下面是我对自己微信小程序学习的画的一个思维导图: 以后就一步一步的完善思维导图吧...到最后,应该是相当的庞大了呀...嘿嘿嘿! 目录结构总结记录: 包括入口文件app.js app.json&l ...
- centos7使用kubeadm安装kubernetes集群
参考资料:官方文档 一.虚拟机安装 配置说明: windows下使用vbox,centos17.6 min版,kubernetes的版本是1.14.1, 安装如下三台机器: 192.168.56.15 ...
- Golang基础(8):go interface接口
一:接口概要 接口是一种重要的类型,他是一组确定的方法集合. 一个接口变量可以存储任何实现了接口方法的具体值.一个重要的例子就是io.Reader和io.Writer type Reader inte ...
- Day02:正则表达式 / Object / 包装类
JAVA正则表达式 实际开发中,经常需要对字符串数据进行一些复杂的匹配,查找,替换等操作. 通过"正则表达式",可以方便的实现字符串的复杂操作. 正则表达式是一串特定字符,组成一个 ...
- python基础--面向对象之继承
# 继承是一种创建新类的方式,新建的类可以继承一个,或者多个父类, # 父类又可以称为基类或者超类,新建的类可以称为派生类,子类 class ParentClass1: # 定义父类 1 pass c ...