大佬教程收集整理的这篇文章主要介绍了无法再通过 jQuery 选择模式对话框中的交互式网格,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在工作中,我们创建了多个应用程序,其中一些使用模态对话框页面内的交互式网格。上周我们从 Oracle aPEX 19.1 升级到 Oracle aPEX 21.1。
下面描述的问题在 19.1 版本中不存在。
(如果重要:我们必须在 windows 上支持 Google Chrome)
在我们所有的情况下,都可以通过以下方式访问交互式网格:
我们只想让用户访问一些交互式网格功能。 出于这个原因,我们给每个 IG 一个静态 ID。
模态对话框打开,交互网格正常显示。
在升级之前,以下代码段删除了相应 IG 的一些功能:
$(window).on("load",function() {
var actions = apex.region("example_ig_ID").Widget().interactiveGrID("getActions");
actions.remove("SELEction-copy-down");
actions.remove("SELEction-fill");
actions.remove("SELEction-clear");
actions.remove("single-row-vIEw");
actions.remove("SELEction-copy");
});
但自从升级到 21.1 版后,apex.region("example_ig_ID")
返回 null
。也无法通过 $("#example_ig_ID")
找到 dom 元素。
在 Google Chrome 开发者工具中,ID 为 example_ig_ID
的 div 在元素下可见。
加载页面后,然后单击 div 的 class 属性(通过开发人员工具)对其进行编辑(无需真正编辑任何内容)并取消它,apex.region("example_ig_ID")
不再返回 null
。如果我编辑其直接或间接父元素(也使用包含 IG 的模态对话框的 iframe 进行测试),这也适用。
自从发现这一点以来,我试图解决强制刷新或回流的问题。
我测试了此处给出的多个答案:Force DOM redraw/refresh on Chrome/Mac
我尝试的测试(在内联控制台中)都没有解决我的问题:
$("iframe").each(function(){$(this).addClass("TESTClass"); $(this).removeClass("TESTClass");});
和:
$("iframe").each(function(){$(this).hIDe(); $(this).show(0);});
和:
$("iframe").each(function () {
$(this).CSS("opacity",.99);
setTimeout(function () {
$(this).CSS("opacity",1);
},20);
});
我使用了模态对话框本身的 iframe,因为它从一开始就可以选择。
我不确定我是否犯了错误,但非常感谢您的帮助。
此时我得到了帮助,问题解决了。
而不是定义这个'
@H_675_87@$(window).on("load",function() {
var actions = apex.region("example_ig_id").widget().interactiveGrid("getActions");
actions.remove("SELEction-copy-down");
actions.remove("SELEction-fill");
actions.remove("SELEction-clear");
actions.remove("single-row-view");
actions.remove("SELEction-copy");
});
页面里面
函数和全局变量声明
只粘贴函数内容
@H_675_87@var actions = apex.region("P7_SAVED_JOBS_IG").widget().interactiveGrid("getActions");
actions.remove("SELEction-copy-down");
actions.remove("SELEction-fill");
actions.remove("SELEction-clear");
actions.remove("single-row-view");
actions.remove("SELEction-copy");
进入页面下
页面加载时执行
成功了。
我不知道是事件处理程序的执行时间太早还是与 iframe 及其上下文有关。
以上是大佬教程为你收集整理的无法再通过 jQuery 选择模式对话框中的交互式网格全部内容,希望文章能够帮你解决无法再通过 jQuery 选择模式对话框中的交互式网格所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。