2017-08-12 58 views
1

我想了解ADF的ViewObjectImpl类中的isExecuted()的效用。 该文件非常稀少(Indicates whether the row set has been executed or not),我无法清除我的疑惑。什么是ADF ViewObjectImpl类isExecuted()的用法

根据文档,只有行集合至少执行一次,才会返回true。但是,我发现一旦创建了应用程序模块,位于应用程序模块中的视图Object就返回“isExecuted()= true”。这是预期还是有任何设置,因为这是发生?

回答

2

单纯通过应用模块测试仪很难看清楚。 但是,如果您有基于AM的数据控件并在界面(如UI页面)上使用它们,则可以检查isExecuted方法的工作情况。

您的用户界面,您可以创建一个不绑定到任何基于该VO的数据控制的一个基本的页面 - 但仅限于您通过AM的客户端接口暴露一个简单的AM操作:

public void showIsExecuted() {   
    System.out.println("*******TestAppModuleImpl::showIsExecuted() DepartmentsView1:" + this.getDepartmentsView1().isExecuted()); 
    System.out.println("*******TestAppModuleImpl::showIsExecuted() DepartmentsView2:" + this.getDepartmentsView1().isExecuted()); 
    System.out.println("*******TestAppModuleImpl::showIsExecuted() ViewObj1:" + this.getViewObj1().isExecuted()); 
} 

在UI页面(view1.jsf),只调用该方法,而无需使用任何基于VO数据控制的,你的输出应该表明这一点:

*******TestAppModuleImpl::showIsExecuted() DepartmentsView1:false 
*******TestAppModuleImpl::showIsExecuted() DepartmentsView2:false 
*******TestAppModuleImpl::showIsExecuted() ViewObj1:false 

现在,另一个UI页面上(如视图2。 jsf),显示来自一个或多个VO的一些数据,还有一个用于cust的按钮om AM功能。运行该页面后,你应该得到下面的日志(如预期):

*******TestAppModuleImpl::showIsExecuted() DepartmentsView1:true 
*******TestAppModuleImpl::showIsExecuted() DepartmentsView2:true 
*******TestAppModuleImpl::showIsExecuted() ViewObj1:false 

以供参考,这是我的设计时间设置(在JDeveloper 12.2.1.1)看起来像: enter image description here

另外,您可以进一步调整AM - > General - > Tuning - > Customize Runtime Instantiation Behavior下的选项