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 ...
随机推荐
- warning: accessed via instance reference
提示如图: 先简单翻译一下: 静态成员***通过实例对象访问 显示通过类实例而不是类本身调用方法和属性. 现有一个类Test,有静态方法methods和静态属性fields. 对于静态变量或方法,推荐 ...
- Jmeter(十二)响应断言之响应文本和响应信息的差别
在Jmeter的后置处理器中添加响应断言, 要测试的响应字段中有两个很难区分的选项, 响应文本和响应信息. 我做了两个小实验来进行区别. 1. 用Fiddler捕捉了一个POST请求, 其响应是suc ...
- linux查看内存使用情况top
top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器 可以直接使用top命令后,查看%MEM的内容.可以选择按进程查看或者按用户查看, ...
- python 并发编程 socket 服务端 客户端 阻塞io行为
阻塞io行为 server.accept server.recv client.send recv,accept 分为两个阶段 1.wait for data 对方把数据经过网络延迟送到自己的操作系 ...
- C语言I博客作业12-学期总结
一.我学到的内容 二.我的收获 1. https://www.cnblogs.com/1076022899-lj/p/11576442.html 收获:第一次接触到C语言和PTA,第一次学习了博客园和 ...
- Spring MVC 启动报错
Tomcat 启动Spring MVC工程报如下错误 java.lang.ClassNotFoundException: org.springframework.web.context.Context ...
- 【洛谷P1886】滑动窗口——单调队列
没想到啊没想到,时隔两个月,我单调队列又懵了…… 调了一个小时,最后错在快读,啊!!!!(不过洛谷讨论真好啊,感谢大佬!) 考前就不推新东西了,好好写写那些学过的东西 题目点这里(我就不粘了自己点一下 ...
- <<C++ Primer>> 第四章 表达式
术语表 第 4 章 表达式 算术转换(arithmetic conversion): 从一种算术类型转换成另一种算术类型.在二元运算符的上下文中,为了保留精度,算术转换通常把较小的类型转换成较大的类型 ...
- Spring Boot解决无法访问图片的问题
找了很多Spring Boot项目访问图片的解决方式,发现都是配置的,有时配置了也没有用.然后自己研究了一种简单操作的方法. 1,在Spring Boot的static目录下创建一个新目录img(或者 ...
- 090、ELK完成部署和使用 (2019-05-13 周二)
参考https://www.cnblogs.com/CloudMan6/p/7787870.html 上节我们已经部署了容器化的ELK,本节我们学习如何将日志导入ELK并进行图形化展示. 几乎 ...