Primefaces ab法 [英] Primefaces ab method 查看:41 发布时间:2021/6/21 18:46:11 javascript primefaces 本文介绍了Primefaces ab法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我真的被一些代码搞糊涂了.我正在将一个巨大的 Scala 应用程序转换为 Java.这是一个网络应用程序,并使用 PrimeFaces 作为用户界面.然而,有一些事情让我感到不安.一个是这个代码片段:我注意到对 ab 方法的调用.我一直在寻找文档几个小时,但似乎找不到任何东西.有谁知道 ab 方法是做什么的?第二个问题是:任何人都可以深入了解这段代码的功能吗?我正在尝试确定调用了哪一部分 Scala 代码,但据我所知,这只是对 index.xhtml 页面的 AJAX 请求.> 编辑 我认为就是生成提交按钮的标签. 解决方案 My"对 ab 方法的使用之一是更新 javascript 代码中的一些组件.有时 remoteCommand 不适合这种情况.所以我必须在运行时使用 jQuery 选择器更新一些组件(复杂的不是按名称或类).假设我想更新页面中的所有 p:lightBox 链接(为了清空 iFrame)$('.ui-lightbox').each(function() {PrimeFaces.ab({source:'',update:$(this).attr('id').replace('_panel','')});}希望有帮助.I'm really getting confused by some code. I'm in the process of converting a giant Scala app over to Java. It's a web-app, and uses PrimeFaces for the User interface. However, there are a few things that are throwing me. One is this code snippet:<td><button id="search:j_idt30" name="search:j_idt30" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" onclick="PrimeFaces.ab({formId:'search',source:'search:j_idt30',process:'@all',update:'meetingIndices'});return false;" type="submit"><span class="ui-button-text">Submit</span></button></td> I've noticed a call to the ab method. I've been hunting for documentation for a few hours now, and I can't seem to find anything. Does anyone know what the ab method does? The second question is: Can anyone give any insight into the function of this code? I'm trying to work out which bit of Scala code is called, but as far as I can tell it's just an AJAX request to the index.xhtml page. Edit <p:commandButton type="submit" value="Submit" update=":meetingIndices" /> I think that is the tag generating the submit button. 解决方案 One of "My" uses to ab method is to update some components inside javascript code. some times remoteCommand doesn't fit in the situation. So I have to update some components at runtime using jQuery selectors (complicated ones not by name or class). Let's say I want to update all the p:lightBox links in the page (in order to empty the iFrames) $('.ui-lightbox').each(function() { PrimeFaces.ab({source:'',update:$(this).attr('id').replace('_panel','')}); } Hope it helps. 这篇关于Primefaces ab法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! 查看全文 相关文章 PrimeFaces.ab功能; ab负载测试; AB负载测试; 使用Python将字节反向AB CD转换为CD AB; ab药器极慢; Javascript数组ab = ba; ab中的指针; 知道Ab. VB .Net; benchmark multiple URLs using ab; 为什么向上转换ab.a + ab.b会产生结果1和1.0?; Flex如何区分A,AB和ABC?; javascript - $('div+.ab')和$('.ab+div') 哪个效率高?; 无效的二进制操作数*(具有'ab {aka struct a}'和'ab * {aka struct a *}'); PrimeFaces 图标; PrimeFaces图标; 哪个测量正确,JMeter 还是 Apache ab?; 用`ab`替换刚刚输入的字符`a`; 大尾数法和小尾数法; 点表示法与方法表示法; ab压力测试Time per request没看懂; JavaMelody和Ab中的tomcat性能监视; apachebench(ab)和传输编码分块的问题; 简化正则表达式“ab|a|b"; Unable to create AB OTA zip file in AOSP 11; Primefaces p:缓存; 前端开发最新文章 为什么Chrome(在Electron内部)突然重定向到chrome-error:// chromewebdata?; 错误102(net :: ERR_CONNECTION_REFUSED):服务器拒绝连接; 如何解决'重定向已被CORS策略阻止:没有'Access-Control-Allow-Origin'标题'?; 如何处理“Uncaught(in promise)DOMException:play()失败,因为用户没有首先与文档交互。”在桌面上使用Chrome 66?; 警告:添加非被动事件侦听器到滚动阻塞'touchstart'事件; 如何在浏览器中播放.TS文件(视频/ MP2T媒体类型)?; 此请求已被阻止;内容必须通过HTTPS提供; 资源解释为样式表,但转换为MIME类型text / html(似乎与web服务器无关); 通过HTTPS加载页面但请求不安全的XMLHttpRequest端点; 拒绝从执行脚本'*',因为它的MIME类型(“应用/ JSON')不是可执行文件,并严格MIME类型检查被启用。; 热门教程 Java教程 Apache ANT 教程 Kali Linux教程 JavaScript教程 JavaFx教程 MFC 教程 Apache HTTP客户端教程 Microsoft Visio 教程 热门工具 Java 在线工具 C(GCC) 在线工具 PHP 在线工具 C# 在线工具 Python 在线工具 MySQL 在线工具 VB.NET 在线工具 Lua 在线工具 Oracle 在线工具 C++(GCC) 在线工具 Go 在线工具 Fortran 在线工具 登录 关闭 扫码关注1秒登录 发送“验证码”获取 | 15天全站免登陆