javascript - How to stop the grid from loading
问题描述
I have a ADF jsff page which contains a af:inlineFrame this frame invokes slickGrid, on save i validate the grid cells and error message is displayed by showing an alert message. Once i click on ok, i expect the grid to stay as it is but the grid gets loaded again. After displaying the alert message i have tried window.frames[0].stop()
; but this didnt help
JSFF:
<af:inlineFrame id="slickFrame"
source="/js/views/tarAutomation.html"
sizing="preferred" shortDesc="Slick Grid">
<af:serverListener type="onLoadEvt" method="#{pageFlowScope.myBean.initializeGrid}" />
<af:clientListener method="triggerOnLoad" type="inlineFrameLoad"/>
on click of Save
function save() {
// Parse through the dirtied cells
for(d in dirtyCells)
{
var dirtiedRow = dirtyCells[d].row;
failures = //Gets the failure array
if(failures.length>0){
alert("Mandatory fields are not entered");
grid.gotoCell(dirtyCells[d].row, dirtyCells[d].cell);
// This is to set the focus on the errored cells
window.frames[0].stop();
}
else{
//Continue with the save operation
}
Please let me know how to stop the grid from getting loaded. I want the loading to stop so that the user selected options are seen as errored.
解决方案
我找到了一种阻止网格加载的方法在 Jsff javascript 函数中添加事件参数在此方法的末尾添加 event.cancel(),这将取消新事件的传播更多详细信息在这里 https://docs.oracle .com/cd/E16764_01/web.1111/b31973/af_event.htm
推荐阅读
- angular - 从材料日期选择器中提取和分解日期
- c# - 填充 ComboBox(3 层架构)
- mongodb - 如何通过字段 user_id 进行分组并从 mongoDB 中的另一个表填充
- angular - 角度切换仅选定项目
- scala - 使用带有类型选择的辅助模式时发生反射调用
- java - 如果一个类用类似的方法实现了多个接口,它会重载吗?
- suitescript1.0 - NetSuite - 套件脚本 1.0
- powershell - 使用 powershell 脚本合并两个 html 报告
- reactjs - 尽管在 ant design 中安装了 bable 导入插件,但为什么我会收到减少应用程序包大小的警告
- codeigniter - 访问 Codeigniter 4 模型中的自定义对象