2009年10月11日星期日

WebCenter_006:Portal开发指南之一:在JSF中管理文档

运行环境:JDeveloper 11.1.1.6.0 + Oracle Database 10g Express Edition 10.2.0.1。

完成《Add Content to a JSF Page》。
说明:文档是针对11.1.1.3的,我是使用JDeveloper 11.1.1.6.0重新做的。

学习要点:
(1)创建Content Repository Connection
使用Content Repository Connection可以连接到:Oracle Portal,Oracle Content Server,File System repository。
(2)创建Content Repository Data Control
拖放Content Repository Data Control就可以生成页面组件,比如Table,显示Content Repository中的内容。
(3)使用Documents service task flows

1. 创建Portal 应用
(1)选择WebCenter Portal Application模板。

(2)该模板将为你的Portal应用添加很多WebCenter特性,如Oracle Composer,Resource Palette,task flows,content integration,WebCenter Services。

(3)勾上“Configure Portal”选项(默认是选中的)。


2. 创建 Content Repository 连接。
(1)File > New > General > Connections > Content Repository Connection。

(2)支持连接Oracle Portal,Oracle Content Server,File System。

其它说明:
勾上“Set as Primary”选项。
Identity Propagation 选项:选中的话将会把应用中的用户身份传播到 repository 中,作为repository中的用户,这样就不用再验证了。
如果当前用户身份不能直接传播给repository,可以使用External Application method。参数设置如下:
  • URL of the external application:http://myexternalapp.mycompany.com:8888/mycontent/ws。

  • user name and password。

  • shared credentials that can be used at design time and runtime。

  • public credentials that can be used at design time and runtime.


3. 创建Content Repository Data Control
(1)File > New > Business Tier > Content Repository > Content Repository Data Control。
或者直接右键Content Repository Connection,选择“Create Data Control”:

(2)选择前面创建好的Content Repository Connection

(3)Content Repository Data Control 符合Java Content Repository (JCR 170) 标准,包括如下功能: publish content,links,tables,files,folders,search,advanced search。


4. 创建JSF页面,以表格的形式展现Repository Content。
(1)拖放 MyFSDC data control > getItems > Return,选择生成ADF Read-only Table。

(2)设置参数值: path=/


5. 增加Document Manager Task Flow。
Documents service可以让你浏览和管理Repository Content。
(1)选择Document- Document Manager

(2)设置参数ConnectionName


6. 最终页面运行效果如下:


Project 下载:MyWebCenterApp.7z

没有评论: