Tips for using Oracle ADF (Application Development Framework)
来源:互联网 发布:ubuntu squid 透明代理 编辑:程序博客网 时间:2024/05/01 10:50
1. 同样的方法,写到AM的实现类里与写到ManageBean里面在调用的时候效果就不一样,还不知道具体原因。比如下面代码,
ViewObject vo = am.findViewObject("View1"); ViewCriteria vc = vo.createViewCriteria(); ViewCriteriaRow vcr = vc.createViewCriteriaRow(); vcr.setAttribute("ID", "123"); vc.add(vcr); vo.applyViewCriteria(vc); vo.executeQuery(); if (vo.getEstimatedRowCount() == 1) { vo.setCurrentRow(vo.first()); }
当写到AM的实现类里时(通过AMClient Interface暴露给DataControl),调用后,当应用跳转到下一个页面(如显示View1的内容)时,页面的确显示的是View1的currentRow的内容;然而如果上面代码放到ManageBean中,则调用后应用跳转到下一个页面时,页面并没有显示选中的currentRow,而很奇怪的,显示的是View1正常结果集里面的第一条数据。
2.注意在调用如上的方法后,一定要在最后加上下面一句,否则会对后面的vo query产生影响,切记切记!
vo.applyViewCriteria(null);Debug经验:关键code一定要一步一步的debug,不要想当然,比如下面这段code, vo.executeQuery()怎么知道返回的就是DafQAVerifyView表中全部的记录?!万一前面有个家伙没有做把ViewCriteria清空怎么办?!
DafQAVerifyViewImpl vo = (DafQAVerifyViewImpl)findViewObject("DafQAVerifyView1"); vo.executeQuery(); vo.findAndSetCurrentRowByKey(qaVerifyRow.getKey(), 0);
- Tips for using Oracle ADF (Application Development Framework)
- Ten Tips for Android Application Development
- Oracle ADF Framework
- Notepad++ Tips For Fast Development
- Tips for using Breakpoints
- Oracle ADF Development Essentials - Part 4
- Some tips for using CCS
- Tips for using Xcode - Profile
- Tips for the best development tools
- Oracle Application Framework
- Oracle Application Hints and Tips
- 使用Swing Application FrameWork (Using Swing Application Framework)
- Using Eclipse for C/C++ Development
- DelphiArx(crack) for Delphi development AutoCAD application.
- CodeIgniter for Rapid PHP Application Development
- The future for mobile application development
- nvidia-docker for your GPU application development
- Some tips for using visual studio .net
- JavaScript捕捉键盘按下的事件
- js 简单的类下拉菜单特效
- listView 添加多个不同的adapter
- C#无边框窗体的拖动
- 仿163首页广告伸缩效果
- Tips for using Oracle ADF (Application Development Framework)
- ruby入门_符号
- dedecms首页图文混排调用的方法
- 从CE角度谈谈IBM Global Delivery Centre (china) GDC/ ISSC
- shell实现ftp命令示例
- TCP,SYN,FIN扫描的介绍
- SRM500 DIV2 - SRMCards
- U-BOOT-2009.11在MINI2440上移植探索详情
- 快速幂的应用