ADF Block UI Input
来源:互联网 发布:金吉数据黑匣子 编辑:程序博客网 时间:2024/06/06 12:57
功能:在ADF界面上通过Lov选择或者是直接输入经销商,点击goButton按钮,则使用脚本弹出一个页面加载数据。
问题:在事件没有执行完成之前,用户手工更改了经销商,即键盘输入,再次点击按钮,最后生成的数据跟前一次数据一样。
原因:传递过去的ID没有发生改变。
需求:在事件没有执行完成之前,不允许用户更改条件。
解决方法:
利用ADF Faces JavaScript API中的AdfBaseEvent.preventUserInput function来阻止事件运行中的用户输入。
The ADF Faces JavaScript API includes the AdfBaseEvent.preventUserInput function. To prevent all user input while the event is processing, you can call the preventUserInput function, and a glass pane will cover the entire browser window, preventing further input until the event has completed a roundtrip to the server.
You can use the preventUserInput function only with custom events, events raised in a custom client script, or events raised in a custom client component's peer. Additionally, the event must propagate to the server.
脚本如下:
function queueEvent(event)
{
event.cancel(); // cancel action event
var source = event.getSource();
var params = {};
var type = "customListener";
var immediate = true;
var isPartial = true;
var customEvent = new AdfCustomEvent(source, type, params, immediate);
customEvent.preventUserInput();
customEvent.queue(isPartial);
}
完成了脚本,需要由组件来触发。在goButton里添加client listener事件:<af:clientListener method="queueEvent" type="click"/>
由于goButton按钮同时要去调用另外一个脚本doDistributorConfirmLetterEvent做打开新窗口的事情,因此调用顺序queueEvent应放在
doDistributorConfirmLetterEvent之后,或者将2个脚本融合在一起。
<af:goButton text="生成经销商确认函" inlineStyle="width:200px; text-align:center;" id="doEventId">
<af:clientListener type="click" method="doDistributorConfirmLetterEvent"/>
<af:clientListener method="queueEvent" type="click"/>
</af:goButton>
- ADF Block UI Input
- ADF.UI.input.autoSuggestBehavior 使用介绍
- adf oracle input Validator
- ADF.UI.Query 使用方法
- block-ui
- UI - Block
- ADF Generator for Dynamic ADF BC and ADF UI
- ADF UI: Creating Autosuggest LOV
- ADF Input File组件使用不正常
- Composite UI Application Block
- JQuery Block UI V2
- JQuery Block UI V2
- jquery block ui
- gtk ui block
- jquery block ui 下载
- UI Block高级
- UI Block传值
- UI中的Block传值
- 汇编与常用机内码
- 有没有软件开发文档实例
- 面试题(Qt + 函数指针)
- linux vi 中文乱码解决
- 针对于Dialog来说Toast和Notification
- ADF Block UI Input
- java中GB2312 To Utf-8字符转换
- Spring框架下实现基于组的用户权限管理
- maximo界面设计器深度研究
- dropdownlist绑定数据库字段的实现
- 用EXCEL 过滤数据
- Interface and Implementation section available scope.
- 闭嘴
- jQuery 导航菜单