使用LaunchPopupListener过滤Input Text with LOV(2)

187 篇文章 2 订阅
运行环境:JDeveloper 11.1.2.2.0 + Oracle Database 10g Express Edition 10.2.0.1。

使用Input Text with LOV组件时,点击按钮会显示LOV的查询结果。
如果需要通过程序设置查询条件,可以定制LaunchPopupPopupListener。
与上一个实验不同的地方是:在LOV对应的VO上没有Where子句和参数定义。
也就是说,通过程序动态设置Where子句。

1. Managed Bean的代码
    public void jobIdLaunchPopupListener(LaunchPopupEvent launchPopupEvent) {
        BindingContainer bindings = getBindings();
        JUCtrlListBinding lov = (JUCtrlListBinding)bindings.get("JobId");
        String whereClause = "Min_Salary > 5000 AND Max_Salary < 15000";
        lov.getListIterBinding().getViewObject().setWhereClause(whereClause);
    }

说明:这里的Min_Salary和Max_Salary是数据库表中字段的名称,不是VO中字段的名称。

2. 运行
显示的查询结果是MinSalary>5000且MaxSalary<15000 br="">

Project 下载: ADF_LOV_InputText(5).7z

参考文献:
1. http://jobinesh.blogspot.com/2009/08/tips-on-lov-runtime.html

2. https://blogs.oracle.com/jdevotnharvest/entry/how_to_dynamically_filter_model

http://maping930883.blogspot.com/2012/08/adf188launchpopuplistenerinput-text.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值