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 ...
随机推荐
- if-else判断语句
<1>if-else的使用格式 if 条件: 满足条件时要做的事情1 满足条件时要做的事情2 满足条件时要做的事情3 ...(省略)... else: 不满足条件时要做的事情1 不满足条件 ...
- Word模板替换
package com.sisa.auweb.tools.bookmarkprocess; import org.apache.poi.openxml4j.opc.OPCPackage; import ...
- rocketMQ 消息的 tag
tag 的使用场景:不同的消费组,订阅同一 topic 不同的 tag,拉取不同的消息并消费.在 topic 内部对消息进行隔离. producer 发送消息,指定 tag Message msg = ...
- json中loads()和dumps()的应用
import json s = {'name': 'jack'} #将dict转换成strl = json.dumps(s)print(type(l)) #将str转换成dictm = json.lo ...
- 浅谈Excel开发:二 Excel 菜单系统(转)
编辑器加载中...http://www.cnblogs.com/yangecnu/p/Excel-Menu-System-Introduction.html 在开始Excel开发之前,需要把架子搭起来 ...
- Function Expression
One of the key characteristics of function declarations is function declaration hoisting, whereby fu ...
- oracle 11g错误ora-01033:oracle initialization or shutdown in progress解决办法
原文出自:http://blog.csdn.net/liverliu/article/details/6410287 一.首先:问题的产生原因,先前我在f:/llh/目录创建的一个bookspace表 ...
- Redis 入门 3.1 热身
3.1 热身 1. 获得符合规则的键名列表 KEYS pattern pattern 支持 glob 风格通配符格式 语言 字符组 ? 匹配一个字符 * 匹配任意个(包括0个)字符 [] 匹配括号间的 ...
- git 合并远程分支
假设远程分支 dev-by-wbw 本地分支dev-by-wgg 在本地新建一个与远程的分支dev-by-wbw相同(被合并的版本)的分支dev-by-wbw git checkout - b or ...
- 求第n个质数
输入一个不超过 10000 的正整数 n,求第n个质数 样例输入 10 样例输出 29 题目地址 #include<stdio.h> #include<math.h> int ...