ADF_Data Binding系列3_使用Placeholder Data Control

2015-02-16 Created By BaoXinjian

一、摘要


本文介绍如何使用placeHolder data control作为ADF Date数据源,测试并运行页面显示数据

Step 1: Create a New Application and Project

Step 2: Create Placeholder Data Types

Step 3: Add Sample Data

Step 4: Add a List of Values (LOV)

Step 5: Create a JSF Page

 

1: Create a New Application and Project


Step1. 创建一个Fusion Web Application

 

Step2. 查看所常见的Application

Step3. 创建Placeholder Data Control

 

2: Create Placeholder Data Types


Step1. 创建Placeholder Date类型的Data Controls中Categorys组

Step2.  创建Placeholder Date类型的Data Controls中Products组

Step3. 查看所创建的Application和Data Controls的结构Category->Products的Attributes

 

3: Add Sample Data


Step1.  导入数据至Placeholder Data中

Step2. 手工导入Category数据,编写数据如下

Step3.  编写products.csv

Step4. 数据如下

1,Laptop,Standard 14 inch display 2GB memory,850.00,Hardware Solutions
1,Flat Panel Monitor,22 inch with adjustable height stand,499.00,Computer Superstore
2,Keyboard,Compact USB keyboard,8.00,Computer Superstore
2,Mouse,Ergonomic wheel mouse,19.99,Office Discounters
3,Notebooks,One dozen spiral bound notebooks,10.00,Office Discounters
3,Blue pens,Box of 24 blue pens,20.00,Office Discounters
3,Stapler,Medium size black stapler,11.99,Office Discounters

Step5. 导入Products数据至Data Controls中

Step6. 导入成功,显示数据如下

 

4: Add a List of Values (LOV)


Step1. 编辑Placeholder Data,新增栏位的LOV功能

Step2.定义Supplier为LOV,显示LOV为静止的手工输入值

 

5: Create a JSF Page


Step1.  创建一个测试页面

Step2. 定义页面的属性参数

Step3. 从Data Controls中将Products数据绑定到页面中,显示为ADF Read-Only Table

Step4.  从Data Controls中将Category数据绑定到页面中,显示为树形结构

Step5. 绑定树形结构时,定义树形参数

Step6. 定义Table的Partial Trigger为Tree,当Tree中节点变化时,影响表中的数据

Step7. 最终设计的页面结果如下

Step8. 运行测试,左边Tree节点变化时,对应Table数据显示,并Supplier显示为LOV

 

Thanks and Regards

posted on 2015-03-17 11:20  东方瀚海  阅读(653)  评论(0编辑  收藏  举报