ADF ViewObjectImpl 中 isExecuted() 的用途是什么 class
What is use of isExecuted() in ADF ViewObjectImpl class
我想了解 isExecuted() 在 ADF 的 ViewObjectImpl 中的实用性 class。
文档非常稀疏(Indicates whether the row set has been executed or not),我无法消除疑虑。
根据文档,只有行集至少执行一次才会 return 为真。但是,我看到我的应用程序模块一创建,应用程序模块中的一个视图对象就 returning "isExecuted() = true " ..这是预期的还是有任何设置因为这是怎么回事?
仅通过应用程序模块测试器很难看到。
但是,如果您有基于您的 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 页面(例如 view2.jsf)上,显示来自一个或多个 VO 的一些数据以及自定义 AM 功能的按钮。在 运行 页面之后,您应该在日志中看到以下内容(如预期的那样):
*******TestAppModuleImpl::showIsExecuted() DepartmentsView1:true
*******TestAppModuleImpl::showIsExecuted() DepartmentsView2:true
*******TestAppModuleImpl::showIsExecuted() ViewObj1:false
作为参考,这是我的设计时设置(在 JDeveloper 12.2.1.1 中)的样子:
此外, 您可以进一步调整 AM -> General -> Tuning -> Customize Runtime Instantiation Behavior
下的选项
我想了解 isExecuted() 在 ADF 的 ViewObjectImpl 中的实用性 class。 文档非常稀疏(Indicates whether the row set has been executed or not),我无法消除疑虑。
根据文档,只有行集至少执行一次才会 return 为真。但是,我看到我的应用程序模块一创建,应用程序模块中的一个视图对象就 returning "isExecuted() = true " ..这是预期的还是有任何设置因为这是怎么回事?
仅通过应用程序模块测试器很难看到。
但是,如果您有基于您的 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 页面(例如 view2.jsf)上,显示来自一个或多个 VO 的一些数据以及自定义 AM 功能的按钮。在 运行 页面之后,您应该在日志中看到以下内容(如预期的那样):
*******TestAppModuleImpl::showIsExecuted() DepartmentsView1:true
*******TestAppModuleImpl::showIsExecuted() DepartmentsView2:true
*******TestAppModuleImpl::showIsExecuted() ViewObj1:false
作为参考,这是我的设计时设置(在 JDeveloper 12.2.1.1 中)的样子:
此外, 您可以进一步调整 AM -> General -> Tuning -> Customize Runtime Instantiation Behavior
下的选项