博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PrimeFaces ab function
阅读量:5250 次
发布时间:2019-06-14

本文共 1617 字,大约阅读时间需要 5 分钟。

The  function is a shortcut function for .

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

The PrimeFaces.ajax.AjaxRequest can be asynchronous or synchronous. The  uses the , 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 , this cfg object has:

  • cfg.global: a boolean value used to trigger  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 , might be helpful.

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

转载于:https://www.cnblogs.com/stevenguan/p/5802071.html

你可能感兴趣的文章
利用Fiddler拦截接口请求并篡改数据
查看>>
python习题:unittest参数化-数据从文件或excel中读取
查看>>
在工程中要加入新的错误弹出方法
查看>>
PS 滤镜— — sparkle 效果
查看>>
网站产品设计
查看>>
代理ARP
查看>>
go 学习笔记(4) ---项目结构
查看>>
java中静态代码块的用法 static用法详解
查看>>
Java线程面试题
查看>>
Paper Reading: Relation Networks for Object Detection
查看>>
day22 01 初识面向对象----简单的人狗大战小游戏
查看>>
mybatis源代码分析:深入了解mybatis延迟加载机制
查看>>
Flask三剑客
查看>>
Hibernate-缓存
查看>>
【BZOJ4516】生成魔咒(后缀自动机)
查看>>
提高PHP性能的10条建议
查看>>
svn“Previous operation has not finished; run 'cleanup' if it was interrupted“报错的解决方法...
查看>>
熟用TableView
查看>>
Java大数——a^b + b^a
查看>>
poj 3164 最小树形图(朱刘算法)
查看>>