Oracle Fusion Middleware Developer’s Guide For Universal Content Management Web Center CMS Dev

User Manual: Pdf

Open the PDF directly: View PDF PDF.
Page Count: 392 [warning: Documents this large are best viewed by clicking the View PDF Link!]

Oracle® WebCenter Content
Developer’s Guide for Content Server
11g Release 1 (11.1.1)
E10807-04
November 2011
Oracle WebCenter Content Developer's Guide for Content Server, 11g Release 1 (11.1.1)
E10807-04
Copyright © 1994, 2011, Oracle and/or its affiliates. All rights reserved.
Primary Author: Bonnie Vaughan
Contributing Authors: Sean Cearley, Sandra Christiansen, Will Harris, Karen Johnson, Jean Wilson
Contributors: Sharmarke Aden, Scott Nelson, Rick Petty, David Truckenmiller, Ron van de Crommert
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it
on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data
delivered to U.S. Government customers are "commercial computer software" or "commercial technical data"
pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As
such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and
license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of
the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software
License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software or hardware is developed for general use in a variety of information management
applications. It is not developed or intended for use in any inherently dangerous applications, including
applications that may create a risk of personal injury. If you use this software or hardware in dangerous
applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other
measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages
caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of
their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks
are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD,
Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced
Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products,
and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly
disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle
Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your
access to or use of third-party content, products, or services.
iii
Contents
Preface .............................................................................................................................................................. xvii
Audience.................................................................................................................................................... xvii
Documentation Accessibility.................................................................................................................. xvii
Related Documents .................................................................................................................................. xvii
Conventions ............................................................................................................................................. xviii
New and Changed Features.................................................................................................................. xix
New Features for 11g Release 1 (11.1.1) ................................................................................................. xix
Changed Features for 11g Release 1 (11.1.1).......................................................................................... xx
Part I Getting Started with Customizing Oracle WebCenter Content Server
1 Introduction to Oracle WebCenter Content Server
1.1 Overview of Content Server Architecture............................................................................... 1-1
1.1.1 WebCenter Content Directories and Files........................................................................ 1-1
1.1.1.1 Terminology for WebCenter Content Directories ................................................... 1-2
1.1.1.2 The bin Directory.......................................................................................................... 1-2
1.1.1.3 The config Directory..................................................................................................... 1-3
1.1.1.4 The components Directory.......................................................................................... 1-5
1.1.1.5 The resources Directory............................................................................................... 1-5
1.1.1.6 The weblayout Directory............................................................................................. 1-6
1.1.2 Resources .............................................................................................................................. 1-6
1.2 Customization Types.................................................................................................................. 1-7
1.3 Customization Planning ............................................................................................................ 1-8
1.4 Recommended Skills and Tools for Customizing Content Server ...................................... 1-9
1.5 Content Server Behavior......................................................................................................... 1-10
1.5.1 Startup Behavior ............................................................................................................... 1-11
1.5.1.1 Startup Steps............................................................................................................... 1-11
1.5.1.2 Effects of Configuration Loading............................................................................ 1-12
1.5.2 Resource Caching ............................................................................................................. 1-13
1.5.3 Page Assembly .................................................................................................................. 1-13
1.5.4 Database Interaction......................................................................................................... 1-14
1.5.5 Localized String Resolution ............................................................................................ 1-14
1.5.6 Application Integrations.................................................................................................. 1-14
iv
2 Introduction to the Oracle Fusion Order Demo Sample Application
2.1 About Fusion Order Demo and the Suppliers Module......................................................... 2-1
2.2 Setting Up the Fusion Order Demo Application.................................................................... 2-2
2.3 Running the Suppliers Module................................................................................................. 2-2
2.3.1 Suppliers Module Code ...................................................................................................... 2-3
2.3.2 Suppliers Module Pages ..................................................................................................... 2-5
Part II Changing the Look and Feel of the Content Server Interface
3 Customizing the Content Server Interface
3.1 About Customizing the Content Server Interface.................................................................. 3-1
3.1.1 Types of Skins and Layouts................................................................................................ 3-1
3.1.2 Skins....................................................................................................................................... 3-2
3.1.3 Layouts.................................................................................................................................. 3-2
3.2 Choosing a Different Skin or Layout ....................................................................................... 3-2
3.2.1 How to Choose a Different Skin or Layout...................................................................... 3-2
3.2.2 What Happens at Runtime................................................................................................. 3-2
3.3 Configuring a Default Skin and Layout for New Users and Guests................................... 3-3
3.4 Modifying the Template for a Skin or Layout........................................................................ 3-3
3.4.1 About Dynamic Publishing................................................................................................ 3-3
3.5 Altering the Anonymous User Interface ................................................................................. 3-4
3.5.1 How to Alter the Anonymous User Interface.................................................................. 3-4
3.5.2 What Happens at Runtime................................................................................................. 3-4
3.6 Changing the URL of the Login Page ...................................................................................... 3-5
3.7 Creating and Publishing a New Layout.................................................................................. 3-7
3.8 Optimizing the Use of Published Files .................................................................................... 3-7
3.8.1 Bundling Files....................................................................................................................... 3-7
3.8.2 Referencing Published Files ............................................................................................... 3-9
4 Creating Dynamic Server Pages
4.1 About Dynamic Server Pages.................................................................................................... 4-1
4.1.1 Page Types............................................................................................................................ 4-3
4.1.1.1 IDOC File ....................................................................................................................... 4-3
4.1.1.2 HCST File....................................................................................................................... 4-3
4.1.1.3 HCSP File....................................................................................................................... 4-4
4.1.1.4 HCSF File ....................................................................................................................... 4-4
4.2 Altering the Appearance and Navigation of Web Pages...................................................... 4-4
4.2.1 Syntax .................................................................................................................................... 4-4
4.2.1.1 Idoc Script Expressions................................................................................................ 4-5
4.2.1.2 Comparison Operators ................................................................................................ 4-6
4.2.1.3 Special Characters......................................................................................................... 4-6
4.2.1.4 Referencing Metadata .................................................................................................. 4-7
4.2.2 Idoc Script Functions........................................................................................................... 4-7
4.2.2.1 docLoadResourceIncludes Function.......................................................................... 4-7
4.2.2.1.1 Requirements for Calling the docLoadResourceIncludes Function .............. 4-7
4.2.2.1.2 Parameters.............................................................................................................. 4-8
v
4.2.2.2 executeService Function .............................................................................................. 4-8
4.2.3 Development Recommendations ...................................................................................... 4-9
4.2.3.1 General Guidelines....................................................................................................... 4-9
4.2.3.2 HCSF Guidelines ....................................................................................................... 4-10
4.2.4 HCSF Pages........................................................................................................................ 4-10
4.2.4.1 Load Section ............................................................................................................... 4-10
4.2.4.1.1 HTML Declaration ............................................................................................. 4-11
4.2.4.1.2 The docLoadResourceIncludes Function........................................................ 4-11
4.2.4.1.3 Meta Element ...................................................................................................... 4-11
4.2.4.1.4 Variables and Includes ...................................................................................... 4-11
4.2.4.2 Data Section................................................................................................................ 4-11
4.2.4.2.1 Data Section Structure ....................................................................................... 4-11
4.2.4.2.2 The idcformrules Element................................................................................. 4-12
4.2.4.2.3 Metadata Elements............................................................................................. 4-13
4.2.4.2.4 Nested Elements................................................................................................. 4-13
4.2.4.2.5 Referencing XML Elements............................................................................... 4-13
4.2.4.2.6 Form Elements.................................................................................................... 4-14
4.2.4.2.7 ResultSets............................................................................................................. 4-14
4.2.4.3 Form Section............................................................................................................... 4-17
4.2.4.3.1 Form Begin .......................................................................................................... 4-17
4.2.4.3.2 Form Properties.................................................................................................. 4-17
4.2.4.3.3 Form Fields.......................................................................................................... 4-17
4.2.4.3.4 Form Buttons....................................................................................................... 4-18
4.2.4.3.5 Form End............................................................................................................. 4-18
4.3 Creating an IDOC File with Custom Includes for Dynamic Server Pages...................... 4-19
4.4 Creating an HCST Page........................................................................................................... 4-19
4.5 Creating an HCSP Page........................................................................................................... 4-20
4.6 Creating an HCSF Page........................................................................................................... 4-20
4.6.1 Common Code for Forms................................................................................................ 4-25
4.6.1.1 Retrieving File Information...................................................................................... 4-25
4.6.1.2 Referencing a File Extension.................................................................................... 4-25
4.6.1.3 Defining Form Information...................................................................................... 4-26
4.6.1.4 Defining Form Fields ................................................................................................ 4-26
4.6.1.5 Defining Hidden Fields ............................................................................................ 4-26
4.6.1.6 Submitting a Form..................................................................................................... 4-27
4.7 Verifying the Display of an HCST, HCSP, or HCSF Page in a Web Browser................. 4-27
Part III Modifying the Functionality of Content Server
5 Changing System Settings
5.1 About Changing System Settings............................................................................................. 5-1
5.2 Changing System Settings Through the Admin Server ........................................................ 5-2
5.3 Changing System Settings Through the System Properties Application ........................... 5-2
5.4 Customizing the Library and System Home Page with the Web Layout Editor .............. 5-3
5.5 Defining Security and Accounts for Users with the User Admin Application ................. 5-3
vi
6 Changing Configuration Information
6.1 About Changing Configuration Information ......................................................................... 6-1
6.2 Changing Configurations with the Idoc Script Custom Scripting Language.................... 6-1
6.3 Changing Configurations with Development Tools and Technologies ............................. 6-2
7 Customizing Services
7.1 About Customizing Services..................................................................................................... 7-1
7.2 Customizing Services for Communicating with Content Server......................................... 7-2
7.3 Customizing Services for Accessing the Database................................................................. 7-2
8 Generating Actions Menus
8.1 About Generating Actions Menus............................................................................................ 8-1
8.2 Creating Display Tables............................................................................................................. 8-2
8.2.1 Headline View Tables ......................................................................................................... 8-2
8.2.2 Thumbnail View Tables...................................................................................................... 8-4
8.3 Customizing Actions Menus..................................................................................................... 8-4
Part IV Customizing Content Server with Components
9 Getting Started with Content Server Components
9.1 About Standard, System, and Custom Components............................................................. 9-1
9.1.1 Component Files Overview................................................................................................ 9-1
9.1.2 Using Components.............................................................................................................. 9-2
9.1.3 About Directories and Files................................................................................................ 9-4
9.1.3.1 HDA Files ...................................................................................................................... 9-4
9.1.3.1.1 Elements in HDA Files ......................................................................................... 9-5
9.1.3.1.2 The idccs_components.hda, idcibr_components.hda, or
idcurm_components.hda File .............................................................................. 9-7
9.1.3.1.3 Component Definition Files................................................................................. 9-8
9.1.3.2 Custom Resource Files................................................................................................. 9-8
9.1.3.3 Data Binder.................................................................................................................... 9-9
9.1.3.3.1 LocalData................................................................................................................ 9-9
9.1.3.3.2 ResultSets................................................................................................................ 9-9
9.1.3.3.3 Environment .......................................................................................................... 9-9
9.1.3.4 Manifest File .................................................................................................................. 9-9
9.1.3.5 Other Files................................................................................................................... 9-11
9.1.3.5.1 Customized Site Files......................................................................................... 9-11
9.1.3.5.2 Component ZIP File........................................................................................... 9-11
9.1.3.5.3 Custom Installation Parameter Files................................................................ 9-12
9.1.3.6 Typical Directory Structure...................................................................................... 9-12
9.1.4 Development Recommendations ................................................................................... 9-12
9.1.4.1 Creating a Component.............................................................................................. 9-12
9.1.4.1.1 How to Create a Custom Component............................................................. 9-12
9.1.4.2 Working with Component Files .............................................................................. 9-13
9.1.4.3 Using a Development Content Server.................................................................... 9-13
vii
9.1.4.4 Component File Organization ................................................................................. 9-14
9.1.4.5 Naming Conventions................................................................................................ 9-15
9.2 Tools for Managing Components.......................................................................................... 9-15
9.2.1 Component Wizard .......................................................................................................... 9-15
9.2.2 Advanced Component Manager .................................................................................... 9-16
9.2.3 ComponentTool ................................................................................................................ 9-18
9.3 Component Files ...................................................................................................................... 9-18
9.3.1 The idc Product _components.hda File ......................................................................... 9-18
9.3.2 Components ResultSet..................................................................................................... 9-19
9.3.3 Component Definition (Glue) File.................................................................................. 9-19
9.3.3.1 ResourceDefinition ResultSet .................................................................................. 9-20
9.3.3.1.1 ResourceDefinition ResultSet Columns.......................................................... 9-21
9.3.3.2 MergeRules ResultSet ............................................................................................... 9-22
9.3.3.2.1 MergeRules ResultSet Columns....................................................................... 9-22
9.3.3.3 Filters ResultSet.......................................................................................................... 9-23
9.3.3.4 ClassAliases ResultSet .............................................................................................. 9-23
9.4 Resources for Assembling Web Pages.................................................................................. 9-24
10 Enabling and Disabling Components for Content Server
10.1 About Enabling and Disabling Components....................................................................... 10-1
10.2 Enabling a Component............................................................................................................ 10-1
10.3 Disabling a Component .......................................................................................................... 10-2
11 Updating Component Configurations
11.1 About Updating Component Configurations...................................................................... 11-1
11.2 Updating a Component Configuration with the Advanced Component Manager....... 11-2
11.3 Updating a Component Configuration Through the Configuration for instance
Screen ......................................................................................................................................... 11-2
12 Customizing Content Tracker
12.1 About Content Tracker............................................................................................................ 12-1
12.1.1 Content Tracker and Content Tracker Reports ............................................................ 12-2
12.2 Content Tracker Components and Functions...................................................................... 12-2
12.2.1 DataBinder Dump Facility............................................................................................... 12-2
12.2.1.1 Values for the DataBinder Dump Facility.............................................................. 12-3
12.2.1.2 Location of the DataBinder Object Dump Files .................................................... 12-3
12.2.1.3 Names of the DataBinder Object Dump Files ....................................................... 12-3
12.2.2 Performance Optimization.............................................................................................. 12-4
12.2.3 Installation Considerations ............................................................................................. 12-4
12.3 Configuration and Customization......................................................................................... 12-4
12.3.1 Configuration Variables................................................................................................... 12-4
12.3.1.1 Access Control Lists and Content Tracker Reports Secure Mode...................... 12-7
12.3.1.2 Values for the Security Checks Preference Variable ............................................ 12-8
12.3.1.3 File Types for Entries in the SctAccessLog ............................................................ 12-8
12.3.2 Manually Setting Content Tracker Configuration Variables ..................................... 12-8
12.3.3 External Users and Content Item Tracking................................................................... 12-9
viii
12.4 Service Call Configuration...................................................................................................... 12-9
12.4.1 About the Service Call Configuration File .................................................................... 12-9
12.4.1.1 General Service Call Logging ................................................................................ 12-10
12.4.1.2 Extended Service Call Tracking Function............................................................ 12-10
12.4.1.2.1 Service Call ResultSet Combinations............................................................. 12-11
12.4.1.2.2 General Purpose Columns in the Output Table .......................................... 12-11
12.4.1.3 Service Call Configuration File Contents............................................................. 12-12
12.4.1.4 ResultSet Examples ................................................................................................. 12-13
12.4.1.4.1 ServiceExtraInfo ResultSet Entries................................................................. 12-14
12.4.1.4.2 Linked Service Entries and Field Map ResultSets....................................... 12-14
12.4.2 About the Content Tracker Logging Service .............................................................. 12-15
12.4.3 Managing Service Call Information............................................................................. 12-16
12.4.3.1 Manually Editing the SctServiceFilter.hda File................................................... 12-16
12.4.3.2 Setting Required DataBinder Fields to Call the Content Tracker Logging
Service ....................................................................................................................... 12-17
12.4.3.3 Calling the Content Tracker Logging Service from an Application ................ 12-18
12.4.3.4 Calling the Content Tracker Logging Service from Idoc Script........................ 12-18
12.4.4 Service Call Management and the User Interface...................................................... 12-18
12.4.4.1 Adding, Editing, or Deleting Service Entries ...................................................... 12-19
12.4.4.2 Adding, Editing, or Deleting Field Map ResultSets........................................... 12-19
12.5 Customizing Content Tracker.............................................................................................. 12-21
12.5.1 Activity Metrics SQL Queries ....................................................................................... 12-21
12.5.1.1 Customizing the Activity Metrics SQL Queries.................................................. 12-21
12.5.2 External Users and Content Item Tracking................................................................. 12-22
12.6 Web Beacon Functionality .................................................................................................... 12-22
12.6.1 Web Beacon Use Cases................................................................................................... 12-23
12.6.2 Web Beacon Overview................................................................................................... 12-23
12.6.3 Web Beacon Object ......................................................................................................... 12-24
12.6.4 Web Beacon References ................................................................................................. 12-25
12.6.4.1 Format Structure for URL References .................................................................. 12-25
12.6.4.2 Placement and Retrieval Scheme .......................................................................... 12-26
12.6.4.3 Data Capture and Storage ...................................................................................... 12-26
12.6.5 Reduction Processing for Web Beacon References ................................................... 12-27
12.6.6 Limitations and Guidelines........................................................................................... 12-27
12.6.6.1 Limitations................................................................................................................ 12-28
12.6.6.2 Guidelines................................................................................................................. 12-28
12.6.7 Examples of Web Beacon Embedding......................................................................... 12-29
12.6.7.1 Embedded HTML Example ................................................................................... 12-29
12.6.7.2 Embedded JavaScript Example ............................................................................. 12-30
12.6.7.3 Served JavaScript Example .................................................................................... 12-32
13 Customizing Content Categorizer
13.1 About Content Categorizer .................................................................................................... 13-1
13.2 Customizing Content Categorizer......................................................................................... 13-1
ix
14 Downloading Custom Components
14.1 About Downloading Custom Components ......................................................................... 14-1
14.2 Downloading a Component with the Advanced Component Manager ......................... 14-1
14.3 Downloading a Component from Oracle Technology Network...................................... 14-2
15 Creating Custom Components
15.1 About Creating Custom Components .................................................................................. 15-1
15.2 Creating Resources for a Component ................................................................................... 15-1
15.2.1 HTML Includes ................................................................................................................. 15-2
15.2.1.1 The Super Tag ............................................................................................................ 15-2
15.2.1.2 Editing an HTML Include Resource ....................................................................... 15-3
15.2.2 Dynamic Data Tables ....................................................................................................... 15-3
15.2.2.1 Specifying Table Formats ......................................................................................... 15-3
15.2.2.2 Editing a Dynamic Data Table Resource................................................................ 15-5
15.2.2.3 Specifying Table Properties...................................................................................... 15-5
15.2.2.3.1 Merge Properties ................................................................................................ 15-6
15.2.2.3.2 Assembly Properties .......................................................................................... 15-7
15.2.2.3.3 Sort Properties..................................................................................................... 15-8
15.2.2.3.4 Filter and Include Properties ............................................................................ 15-9
15.2.2.4 Using Dynamicdata Idoc Script Functions .......................................................... 15-10
15.2.3 String Resources.............................................................................................................. 15-10
15.2.3.1 String Parameters .................................................................................................... 15-12
15.2.3.2 Editing a String Resource ....................................................................................... 15-13
15.2.4 Dynamic Tables............................................................................................................... 15-13
15.2.4.1 Merge Rules for Dynamic Tables .......................................................................... 15-14
15.2.4.2 Editing a Dynamic Table Resource....................................................................... 15-14
15.2.5 Static Tables ..................................................................................................................... 15-14
15.2.5.1 Merge Rules for Static Tables................................................................................. 15-14
15.2.5.2 Editing a Static Table Resource ............................................................................. 15-14
15.2.6 Queries ............................................................................................................................. 15-14
15.2.6.1 Query Example ........................................................................................................ 15-15
15.2.6.2 Editing a Query Resource....................................................................................... 15-16
15.2.7 Services............................................................................................................................. 15-16
15.2.7.1 Service Example....................................................................................................... 15-19
15.2.7.1.1 Attributes........................................................................................................... 15-20
15.2.7.1.2 Actions ............................................................................................................... 15-21
15.2.7.2 Editing a Service Resource ..................................................................................... 15-24
15.2.8 Templates......................................................................................................................... 15-24
15.2.8.1 Template and Report Pages ................................................................................... 15-27
15.2.8.1.1 Template Page Example .................................................................................. 15-27
15.2.8.1.2 Report Page Example....................................................................................... 15-28
15.2.8.2 Editing a Template Resource ................................................................................. 15-30
15.2.9 Environment Resources................................................................................................. 15-31
15.2.9.1 Environment Resource Example........................................................................... 15-31
15.2.9.2 Editing an Environment Resource ........................................................................ 15-32
x
15.3 Creating a Component Definition File................................................................................ 15-32
15.4 Restarting Content Server to Apply a Component........................................................... 15-33
16 Installing Components
16.1 About Installing Components................................................................................................ 16-1
16.2 Packaging a Component for Installation.............................................................................. 16-2
16.3 Installing a Component with the Advanced Component Manager................................. 16-2
16.4 Installing a Component with the Component Wizard....................................................... 16-3
16.5 Installing a Component with the ComponentTool Utility................................................. 16-3
17 Uninstalling a Component
17.1 About Uninstalling a Component ......................................................................................... 17-1
17.2 How to Uninstall a Component............................................................................................. 17-1
Part V Integrating WebCenter Content into Your Environment
18 Getting Started with Integrating WebCenter Content into Your Environment
18.1 About Integration Methods.................................................................................................... 18-1
18.2 Overview of Web Services...................................................................................................... 18-2
18.3 Virtual Folders and WebDAV Integration........................................................................... 18-3
18.3.1 Virtual Folders................................................................................................................... 18-3
18.3.2 WebDAV Integration ....................................................................................................... 18-4
18.3.2.1 WebDAV Clients ....................................................................................................... 18-4
18.3.2.2 WebDAV Servers....................................................................................................... 18-4
18.3.2.3 WebDAV Architecture.............................................................................................. 18-5
19 Configuring WebCenter Content Web Services for Integration
19.1 About Configuring WebCenter Content Web Services for Integration........................... 19-1
19.1.1 WebCenter Content Web Services.................................................................................. 19-3
19.2 Configuring Web Service Security Through Web Service Policies................................... 19-4
19.2.1 Configuring WS-Security through WS-Policy.............................................................. 19-4
19.3 Configuring SAML Support................................................................................................... 19-5
19.3.1 Configuring a Keystore.................................................................................................... 19-5
19.3.2 Configuring JPS for WebCenter Content to Use the Keystore................................... 19-5
19.3.3 Creating a Client CSF....................................................................................................... 19-6
19.3.4 Configuring a Java Client to Use the Keystore and CSF............................................. 19-7
20 Integrating JavaServer Pages with Content Server
20.1 About JSP Integration.............................................................................................................. 20-1
20.1.1 JSP Execution..................................................................................................................... 20-1
20.1.2 Tomcat................................................................................................................................ 20-2
20.1.3 Features .............................................................................................................................. 20-2
20.2 Configuring JSP Support ........................................................................................................ 20-3
20.3 Loading Example Pages.......................................................................................................... 20-3
xi
21 Using the IdcCommand Utility to Access Content Server
21.1 About the IdcCommand Utility............................................................................................. 21-1
21.2 Setting Up IdcCommand ........................................................................................................ 21-2
21.2.1 Specifying a Command File ............................................................................................ 21-2
21.2.1.1 Command File Syntax............................................................................................... 21-2
21.2.1.2 Precedence .................................................................................................................. 21-3
21.2.1.3 Special Tags and Characters .................................................................................... 21-4
21.2.2 Specifying Configuration Options ................................................................................. 21-4
21.2.2.1 Command File............................................................................................................ 21-4
21.2.2.2 User.............................................................................................................................. 21-4
21.2.2.3 Log File........................................................................................................................ 21-5
21.2.2.4 Connection Mode ...................................................................................................... 21-5
21.3 Running IdcCommand............................................................................................................ 21-5
21.4 Using the Launcher.................................................................................................................. 21-6
21.4.1 Quotation Rules ................................................................................................................ 21-7
21.4.2 Computed Settings ........................................................................................................... 21-7
21.4.3 Launcher Environment Variables ................................................................................ 21-10
21.4.4 User Interface .................................................................................................................. 21-11
21.4.5 Configuring the Launcher ............................................................................................. 21-11
21.4.6 Configuration File Example .......................................................................................... 21-11
21.5 Calling Services Remotely .................................................................................................... 21-14
22 Using the COM API for Integration
22.1 About the COM API................................................................................................................ 22-1
22.2 Calling Content Server Services with the IntradocClient OCX component.................... 22-1
22.2.1 OCX Interface .................................................................................................................... 22-2
22.2.2 IdcClient OCX Description.............................................................................................. 22-2
22.2.2.1 OCX Events ................................................................................................................ 22-3
22.2.2.2 OCX Methods............................................................................................................. 22-3
22.2.2.3 OCX Properties .......................................................................................................... 22-3
22.2.2.4 IdcClient OCX Interface............................................................................................ 22-4
22.2.3 IdcClient OCX Control Setup.......................................................................................... 22-4
22.2.3.1 Setting Up the IdcClient OCX Component............................................................ 22-4
22.2.3.2 Creating a Visual Interface....................................................................................... 22-4
22.2.4 IdcClient Events.............................................................................................................. 22-13
22.2.4.1 IntradocBeforeDownload....................................................................................... 22-13
22.2.4.2 IntradocBrowserPost............................................................................................... 22-14
22.2.4.3 IntradocBrowserStateChange ................................................................................ 22-14
22.2.4.4 IntradocRequestProgress........................................................................................ 22-14
22.2.4.5 IntradocServerResponse......................................................................................... 22-14
22.2.5 IdcClient OCX Methods................................................................................................. 22-15
22.2.5.1 AboutBox .................................................................................................................. 22-16
22.2.5.2 Back............................................................................................................................ 22-16
22.2.5.3 CancelRequest.......................................................................................................... 22-16
22.2.5.4 DoCheckoutLatestRev ............................................................................................ 22-16
22.2.5.5 DownloadFile........................................................................................................... 22-17
xii
22.2.5.6 DownloadNativeFile............................................................................................... 22-17
22.2.5.7 Drag ........................................................................................................................... 22-18
22.2.5.8 EditDocInfoLatestRev............................................................................................. 22-18
22.2.5.9 Forward..................................................................................................................... 22-19
22.2.5.10 GoCheckinPage........................................................................................................ 22-19
22.2.5.11 Home ......................................................................................................................... 22-20
22.2.5.12 InitiateFileDownload .............................................................................................. 22-20
22.2.5.13 InitiatePostCommand ............................................................................................. 22-21
22.2.5.14 Move.......................................................................................................................... 22-21
22.2.5.15 Navigate.................................................................................................................... 22-21
22.2.5.16 NavigateCgiPage ..................................................................................................... 22-22
22.2.5.17 Refresh Browser....................................................................................................... 22-22
22.2.5.18 SendCommand ........................................................................................................ 22-22
22.2.5.19 SendPostCommand................................................................................................. 22-23
22.2.5.20 SetFocus .................................................................................................................... 22-23
22.2.5.21 ShowDMS ................................................................................................................. 22-23
22.2.5.22 ShowDocInfoLatestRev .......................................................................................... 22-24
22.2.5.23 ShowWhatsThis ....................................................................................................... 22-24
22.2.5.24 StartSearch ................................................................................................................ 22-24
22.2.5.25 Stop ............................................................................................................................ 22-24
22.2.5.26 UndoCheckout......................................................................................................... 22-25
22.2.5.27 ViewDocInfo............................................................................................................. 22-25
22.2.5.28 ViewDocInfoLatestRev........................................................................................... 22-25
22.2.5.29 ZOrder....................................................................................................................... 22-26
22.2.6 IdcClient Properties........................................................................................................ 22-26
22.2.6.1 ClientControlledContextValue.............................................................................. 22-26
22.2.6.2 HostCgiUrl ............................................................................................................... 22-27
22.2.6.3 Password................................................................................................................... 22-27
22.2.6.4 UseBrowserLoginPrompt....................................................................................... 22-27
22.2.6.5 UseProgressDialog .................................................................................................. 22-27
22.2.6.6 UserName................................................................................................................. 22-27
22.2.6.7 Working Directory................................................................................................... 22-27
22.3 Using the ODMA API to Access Content Server from a Desktop Application............ 22-28
22.3.1 ODMA Client .................................................................................................................. 22-28
22.3.2 ODMA Interfaces............................................................................................................ 22-28
23 Using RIDC to Access Content Server
23.1 About Remote Intradoc Client (RIDC) ................................................................................. 23-1
23.1.1 Using HttpClient Library Version 4............................................................................... 23-3
23.2 Initializing Connections.......................................................................................................... 23-4
23.3 Configuring Clients ................................................................................................................. 23-5
23.4 Authenticating Users............................................................................................................... 23-9
23.5 Using Services......................................................................................................................... 23-10
23.6 Understanding Connection Pooling.................................................................................... 23-11
23.7 Understanding Streams ........................................................................................................ 23-11
23.8 Understanding Binders......................................................................................................... 23-12
xiii
23.9 Understanding Convenience Classes.................................................................................. 23-13
23.9.1 Setting User Security ...................................................................................................... 23-13
23.9.2 Setting the ADF Connection Facade ............................................................................ 23-15
23.10 Understanding RIDC Filters................................................................................................. 23-17
23.11 Using the RIDC JDeveloper Extension ............................................................................... 23-18
23.11.1 Deploying the RIDC Extension..................................................................................... 23-18
23.11.2 Creating a New Application and Project with RIDC Technologies........................ 23-19
23.11.3 Working with Connections ........................................................................................... 23-20
23.11.4 Example Service Call...................................................................................................... 23-21
24 Using the Content Server JCR Adapter
24.1 About the Java Content Repository Adapter....................................................................... 24-1
24.1.1 JCR Data Model................................................................................................................. 24-2
24.1.2 JCR Adapter Data Model for Content Server .............................................................. 24-2
24.2 Installing Required APIs and Runtime Libraries................................................................ 24-4
24.2.1 Installing ADF Runtime Libraries.................................................................................. 24-4
24.2.2 Deploying Remote Intradoc Client (RIDC)................................................................... 24-4
24.2.3 Deploying the JCR API .................................................................................................... 24-4
24.2.4 Installing the JCR Integration Libraries......................................................................... 24-5
24.2.5 Installing the XML Integration Files .............................................................................. 24-5
24.3 Deploying the JCR Adapter.................................................................................................... 24-5
24.4 Configuring Communication with Content Server ............................................................ 24-5
24.4.1 Supplying a Communication Method ........................................................................... 24-6
24.4.2 Configuring Socket Communication (Listener Port)................................................... 24-6
24.4.3 Configuring Secure Socket Communication (SSL) ...................................................... 24-6
24.4.4 Configuring Web Communication (Web Server Filter).............................................. 24-7
24.4.5 Configuring the User Agent............................................................................................ 24-7
24.4.6 Supplying Cache Settings................................................................................................ 24-7
24.5 Finding Information About a Content Item......................................................................... 24-7
24.6 Using a Search Index ............................................................................................................... 24-9
24.7 Using the File Store Provider ................................................................................................. 24-9
25 Configuring Web Services with WSDL, SOAP, and the WSDL Generator
25.1 About Configuring Web Services with WSDL, SOAP, and the WSDL Generator......... 25-1
25.1.1 Web Services Framework ................................................................................................ 25-2
25.1.1.1 XML Data.................................................................................................................... 25-2
25.1.1.2 WSDL Interface.......................................................................................................... 25-2
25.1.1.3 SOAP Communication.............................................................................................. 25-3
25.1.1.4 UDDI Registry............................................................................................................ 25-3
25.1.1.5 DIME Message Format ............................................................................................. 25-3
25.1.1.6 How the Enabling Technologies Work Together.................................................. 25-3
25.1.1.7 Implementation Architecture .................................................................................. 25-4
25.1.1.8 Implementation on .NET.......................................................................................... 25-4
25.1.1.9 The SOAP Protocol.................................................................................................... 25-5
25.2 Accessing Content Server with a SOAP Client.................................................................... 25-5
25.2.1 Using a Java SOAP Client................................................................................................ 25-5
xiv
25.3 Calling Content Server Services with SOAP........................................................................ 25-6
25.3.1 SOAP Packet Format........................................................................................................ 25-6
25.3.1.1 HTTP Headers............................................................................................................ 25-6
25.3.1.2 Namespaces................................................................................................................ 25-6
25.3.1.3 Nodes........................................................................................................................... 25-7
25.3.1.3.1 Service Node ....................................................................................................... 25-7
25.3.1.3.2 Document Node ................................................................................................. 25-8
25.3.1.3.3 User Node............................................................................................................ 25-8
25.3.1.3.4 Optionlist Node .................................................................................................. 25-8
25.3.1.3.5 Option Subnode in an IDC Optionlist Node.................................................. 25-9
25.3.1.3.6 Resultset Subnode .............................................................................................. 25-9
25.3.1.3.7 Row Subnode ...................................................................................................... 25-9
25.3.1.3.8 Field Subnode ..................................................................................................... 25-9
25.3.2 Special Characters........................................................................................................... 25-10
25.3.3 Sample Service Calls with SOAP Response/Request ............................................... 25-11
25.3.3.1 Ping the Server......................................................................................................... 25-11
25.3.3.1.1 Required Parameters........................................................................................ 25-12
25.3.3.1.2 SOAP Request................................................................................................... 25-12
25.3.3.1.3 Response ............................................................................................................ 25-12
25.3.3.2 Add a New User ...................................................................................................... 25-12
25.3.3.2.1 Required Parameters........................................................................................ 25-13
25.3.3.2.2 Optional Parameters ........................................................................................ 25-13
25.3.3.2.3 Optional Attribute Information...................................................................... 25-13
25.3.3.2.4 SOAP Request................................................................................................... 25-14
25.3.3.2.5 Response ............................................................................................................ 25-14
25.3.3.3 Edit Existing User.................................................................................................... 25-15
25.3.3.3.1 Required Parameters........................................................................................ 25-16
25.3.3.3.2 Optional Parameters ........................................................................................ 25-16
25.3.3.3.3 Optional Attribute Information...................................................................... 25-16
25.3.3.3.4 SOAP Request................................................................................................... 25-17
25.3.3.3.5 Response ............................................................................................................ 25-17
25.3.3.4 Get User Information .............................................................................................. 25-18
25.3.3.4.1 Required Parameters........................................................................................ 25-18
25.3.3.4.2 SOAP Request................................................................................................... 25-18
25.3.3.4.3 Response ............................................................................................................ 25-19
25.3.3.5 Delete User ............................................................................................................... 25-20
25.3.3.5.1 Required Parameters........................................................................................ 25-20
25.3.3.5.2 SOAP Request................................................................................................... 25-20
25.3.3.5.3 Response ............................................................................................................ 25-20
25.3.3.6 Check In Content Item............................................................................................ 25-21
25.3.3.6.1 Required Parameters........................................................................................ 25-22
25.3.3.6.2 Additional Parameters..................................................................................... 25-22
25.3.3.6.3 Optional Parameters ........................................................................................ 25-23
25.3.3.6.4 SOAP Request................................................................................................... 25-23
25.3.3.6.5 Response ............................................................................................................ 25-24
xv
25.3.3.7 Check out Content Item.......................................................................................... 25-25
25.3.3.7.1 Required Parameters........................................................................................ 25-25
25.3.3.7.2 Optional Parameters ........................................................................................ 25-25
25.3.3.7.3 SOAP Request................................................................................................... 25-26
25.3.3.7.4 Response ............................................................................................................ 25-26
25.3.3.8 Undo Content Item Checkout................................................................................ 25-27
25.3.3.8.1 Required Parameters........................................................................................ 25-27
25.3.3.8.2 Optional Parameters ........................................................................................ 25-27
25.3.3.8.3 SOAP Request................................................................................................... 25-28
25.3.3.8.4 Response ............................................................................................................ 25-28
25.3.3.9 Get Content Item Information ............................................................................... 25-29
25.3.3.9.1 Required Parameters........................................................................................ 25-29
25.3.3.9.2 SOAP Request................................................................................................... 25-29
25.3.3.9.3 Response ............................................................................................................ 25-29
25.3.3.10 Get File ...................................................................................................................... 25-30
25.3.3.10.1 Required Parameters........................................................................................ 25-31
25.3.3.10.2 Optional Parameter.......................................................................................... 25-32
25.3.3.10.3 SOAP Request................................................................................................... 25-32
25.3.3.10.4 Response............................................................................................................ 25-32
25.3.3.11 Get Search Results ................................................................................................... 25-34
25.3.3.11.1 Required Parameters........................................................................................ 25-34
25.3.3.11.2 Optional Parameters ........................................................................................ 25-34
25.3.3.11.3 SOAP Request................................................................................................... 25-35
25.3.3.11.4 Response............................................................................................................ 25-35
25.3.3.12 Get Table Data.......................................................................................................... 25-37
25.3.3.12.1 Required Parameters........................................................................................ 25-37
25.3.3.12.2 SOAP Request................................................................................................... 25-37
25.3.3.12.3 Response............................................................................................................ 25-37
25.3.3.13 Get Criteria Workflow Information...................................................................... 25-38
25.3.3.13.1 Required Parameters........................................................................................ 25-38
25.3.3.13.2 SOAP Request................................................................................................... 25-39
25.3.3.13.3 Response............................................................................................................ 25-39
25.4 Using SOAP Packets in Active Server Pages ..................................................................... 25-40
25.4.1 Sample SOAP Request ................................................................................................... 25-40
25.4.2 Sample Active Server Page............................................................................................ 25-41
25.5 Generating WSDL Files to Access WebCenter Content................................................... 25-44
25.5.1 Understanding WSDL Files........................................................................................... 25-44
25.5.1.1 WSDL File Structure................................................................................................ 25-44
25.5.1.1.1 Data Type .......................................................................................................... 25-45
25.5.1.1.2 Message.............................................................................................................. 25-45
25.5.1.1.3 Port Type ........................................................................................................... 25-45
25.5.1.1.4 Binding............................................................................................................... 25-45
25.5.1.1.5 Service and Port................................................................................................ 25-46
25.5.2 Sample WSDL File.......................................................................................................... 25-46
25.5.3 Generating WSDL Files.................................................................................................. 25-49
25.5.4 Generating Proxy Class from WSDL Files .................................................................. 25-50
25.6 Customizing WSDL Files...................................................................................................... 25-50
xvi
26 Customizing the DesktopTag Component
26.1 About the DesktopTag Component ...................................................................................... 26-1
26.2 Enabling the DesktopTag and OracleCleanContent Components................................... 26-2
26.3 Checking Out and Checking In Content Items with DesktopTag.................................... 26-2
26.3.1 File Get Operation............................................................................................................. 26-2
26.3.2 File Check-In Operation................................................................................................... 26-2
26.4 Adding Properties to Checked-Out Content Items ............................................................ 26-3
26.4.1 Viewing Custom Properties ............................................................................................ 26-4
26.4.2 Checking In Documents from Outside Content Server .............................................. 26-5
26.5 Configuring the DesktopTag Component............................................................................ 26-6
26.5.1 DesktopTagFormats Property......................................................................................... 26-6
26.5.2 DesktopTagPrefix Property............................................................................................. 26-6
26.5.3 DesktopTagFields Property............................................................................................. 26-7
26.5.4 DesktopTagPrefixCustom Property............................................................................... 26-7
26.5.5 DesktopTagFieldsCustom Property............................................................................... 26-7
26.5.6 DesktopTagPrefixExtended Property............................................................................ 26-8
26.5.7 DesktopTagFieldsExtended Property............................................................................ 26-8
26.5.8 DefaultTaskPaneUrl Property......................................................................................... 26-8
26.5.9 DesktopTagLog Property ................................................................................................ 26-9
26.5.10 DesktopTagFormatsExclude Property .......................................................................... 26-9
Part VI Appendices
A Troubleshooting
A.1 About Troubleshooting Aids.................................................................................................... A-1
A.2 Viewing Server Errors............................................................................................................... A-1
A.3 Viewing Page Data .................................................................................................................... A-1
A.4 Monitoring Resource Loading ................................................................................................. A-2
Index
xvii
Preface
Oracle WebCenter Content Server is highly functional out of the box, but you can
tailor it to your site requirements in many different ways. This developer’s guide
provides information to help you customize your Content Server instance.
Audience
This guide is intended for developers and administrators who want to customize
Oracle WebCenter Content Server software to suit content management needs that are
specific to their business or organization.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle
Accessibility Program website at
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customers have access to electronic support through My Oracle Support. For
information, visit
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are
hearing impaired.
Related Documents
For more information, see the following Oracle WebCenter Content 11g Release 1
(11.1.1) documents, which are part of the Oracle Fusion Middleware documentation
set:
Oracle WebCenter Content Application Administrator's Guide for Content Server
Oracle WebCenter Content Idoc Script Reference Guide
Oracle WebCenter Content Remote Intradoc Client (RIDC) Java API Reference
Oracle WebCenter Content Services Reference Guide
Oracle WebCenter Content System Administrator's Guide for Content Server
xviii
For additional information, also see the following Oracle Fusion Middleware 11g
Release 1 (11.1.1) documents:
Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application
Development Framework
Oracle Fusion Middleware Getting Started With JAX-WS Web Services for Oracle
WebLogic Server
Oracle Fusion Middleware Interoperability Guide for Oracle Web Services Manager
Oracle Fusion Middleware Programming Advanced Features of JAX-WS Web Services for
Oracle WebLogic Server
Oracle Fusion Middleware Security and Administrator's Guide for Web Services
Oracle Fusion Middleware Third-Party Application Server Guide
Conventions
This document uses the following text conventions.
Convention Meaning
boldface Boldface type indicates graphical user interface elements associated
with an action, or terms defined in text or the glossary.
italic Italic type indicates book titles, emphasis, or placeholder variables for
which you supply particular values.
monospace Monospace type indicates commands within a paragraph, URLs, code
in examples, text that appears on the screen, or text that you enter.
xix
New and Changed Features
This section introduces the new and changed features of Oracle WebCenter Content
that are covered in this guide for Oracle WebCenter Content Server developers.
New Features for 11g Release 1 (11.1.1)
11g Release 1 (11.1.1) includes the following new features:
This guide combines information that was previously contained in the following
documents:
Dynamic Server Pages Guide
Getting Started with the Stellent Developers Kit (SDK)
Idc Command Reference Guide
Modifying the Content Server Interface
Oracle Fusion Middleware JCR Adapter Guide for Content Server
Oracle Fusion Middleware Developer's Guide for Remote Intradoc Client (RIDC)
Using WSDL Generator and SOAP
Working with Components
Web services
WebCenter Content uses Oracle WebLogic Server web services. For more
information, see Chapter 19, "Configuring WebCenter Content Web Services for
Integration."
ComponentTool
The ComponentTool utility has been added to provide a command-line tool for
installing, enabling, and disabling components. For more information, see
Chapter 9, "Getting Started with Content Server Components."
Oracle WebCenter Content Server deployment: Content Server is deployed with
WebCenter Content to an Oracle WebLogic Server domain, which means changes
in configuring and administering Content Server. For more information, see the
Oracle WebCenter Content System Administrator's Guide for Content Server.
xx
Changed Features for 11g Release 1 (11.1.1)
11g Release 1 (11.1.1) includes the following changes:
Oracle WebCenter Content directories and files: WebCenter Content 11g Release 1
(11.1.1) is provided as part of a full media installation of Oracle WebCenter
Content, with the WebCenter Content directories and files. The directory structure
for a WebCenter Content 11g instance is different from an Oracle Universal
Content Management 10g instance. For a description of terms and path names that
are important for understanding and working with the WebCenter Content
structure, see Section 1.1.1.1, "Terminology for WebCenter Content Directories."
SOAP: SOAP is provided with Oracle WebLogic Server, not in Oracle WebCenter
Content.
Web Form Editor: The Web Form Editor user interface and FCKEditor are not
supported.
CIS deprecated: Content Integration Suite (CIS) has been deprecated. Developers
and system integrators are directed to use Remote Intradoc Client (RIDC), which
provides a thin communication API for communication with Oracle WebCenter
Content Server. For details, see the Oracle WebCenter Content Remote Intradoc Client
(RIDC) Java API Reference. For more information, see Section 23, "Using RIDC to
Access Content Server."
Oracle Enterprise Content Management Suite (Oracle ECM) is now part of the
Oracle WebCenter product stack to provide the most complete, open, and unified
enterprise content management platform. The Oracle WebCenter Content Server
software and documentation have been rebranded accordingly.
Part I
Part I Getting Started with Customizing Oracle
WebCenter Content Server
This part provides an overview of customizing Oracle WebCenter Content Server
customization and describes the tools and resources that are available for
customization. This part also describes the Oracle Fusion Order Demo sample
application.
Part I contains the following chapters:
Chapter 1, "Introduction to Oracle WebCenter Content Server"
Chapter 2, "Introduction to the Oracle Fusion Order Demo Sample Application"
1
Introduction to Oracle WebCenter Content Server 1-1
1Introduction to Oracle WebCenter Content
Server
This chapter provides an overview of Oracle WebCenter Content Server and describes
the tools you need and the resources available for customization.
This chapter includes the following sections:
Section 1.1, "Overview of Content Server Architecture"
Section 1.2, "Customization Types"
Section 1.3, "Customization Planning"
Section 1.4, "Recommended Skills and Tools for Customizing Content Server"
Section 1.5, "Content Server Behavior"
For information about troubleshooting aids, see Appendix A, "Troubleshooting."
1.1 Overview of Content Server Architecture
Before beginning a customization project, you need to understand the architecture of
Content Server and how it works. To create a customization efficiently and effectively,
you should have an understanding of the Oracle WebCenter Content directories and
files, available resources, and Content Server behavior.
The web user interface for WebCenter Content, Content Server is deployed as an
application to an Oracle WebLogic Server domain. For information about how Content
Server works, see Section 1.5, "Content Server Behavior."
Content Server can also be deployed to an IBM WebSphere Application Server. For
more information, see "Managing Oracle WebCenter Content on IBM WebSphere" in
the Oracle Fusion Middleware Third-Party Application Server Guide.
1.1.1 WebCenter Content Directories and Files
When you create custom components or dynamic server pages, you work primarily
with WebCenter Content files in these directories:
bin
config
components
resources
weblayout
Overview of Content Server Architecture
1-2 Oracle WebCenter Content Developer's Guide for Content Server
1.1.1.1 Terminology for WebCenter Content Directories
Oracle WebCenter Content documentation uses the following terms when referring to
variables in the directories associated with the Oracle WebCenter Content installation,
configuration, and deployment:
IdcHomeDir: This variable refers to the ucm/idc directory in the WebCenter
Content Oracle home, where the WebCenter Content server media is located. The
server media can run Oracle WebCenter Content Server, Oracle WebCenter
Content: Inbound Refinery, or Oracle WebCenter Content: Records. This is
essentially a read-only directory. The default location is WC_CONTENT_ORACLE_
HOME/ucm/idc. The variable portion of the default location can be changed, but
the path cannot be changed from ucm/idc.
DomainHome: The user-specified directory where an Oracle WebCenter Content
application is deployed to run on an application server. The
DomainHome/ucm/short-product-id/bin directory contains the
intradoc.cfg file and executables. The default location for DomainHome is MW_
HOME/user_projects/domains/base_domain, but you can change the path
and domain name (base_domain) during the deployment of an Oracle
WebCenter Content application to an application server.
short-product-id: An abbreviated name for the type of Oracle WebCenter
Content application deployed to an application server. This name is used as the
context root (default HttpRelativeWebRoot configuration value). Possible
values follow:
cs (Content Server)
ibr (Inbound Refinery)
urm (Records)
IntradocDir: The root directory for configuration and data files specific to a
Content Server instance that is part of an Oracle WebCenter Content application
deployed to an application server. This Idoc Script variable is configured for one
type of Content Server instance: Content Server (cs), Inbound Refinery (ibr), or
Records (urm). The default location of IntradocDir is
DomainHome/ucm/short-product-id, but the IntradocDir directory can be
located elsewhere (as defined in the intradoc.cfg file). The specified
directory must be an absolute path to the instance directory and must be unique to
a particular server or node. The directory files include startup files
(intradoc.cfg and executables).
1.1.1.2 The bin Directory
The bin directory is the root directory for Content Server startup files. It contains the
intradoc.cfg file and the executable files that run Content Server services, applets,
and utilities. It is located at DomainHome/ucm/short-product-id/bin, in which
short-product-id specifies whether it is for Content Server (cs), Inbound Refinery
(ibr), or Records (urm). Table 11 describes the contents of the bin directory.
Caution: Modifying the default variables in these files can cause
WebCenter Content to malfunction. For more information about
configuration variables, see the Oracle WebCenter Content Idoc Script
Reference Guide.
Overview of Content Server Architecture
Introduction to Oracle WebCenter Content Server 1-3
The intradoc.cfg file is used to define system variables for Content Server,
including directory, Internet, and Inbound Refinery settings. Several of these variables
can be set using the WebCenter Content System Properties utility. Example 1–1 shows
a typical intradoc.cfg file.
Example 1–1 intradoc.cfg File
<?cfg jcharset="Cp1252"?>
#Content Server Directory Variables
IntradocDir=C:/oracle/idcm1/
WebBrowserPath=C:/Program Files/Internet Explorer/iexplore.exe
CLASSPATH=$COMPUTEDCLASSPATH;$SHAREDDIR/classes/jtds.jar
#Additional Variables
HTMLEditorPath=C:/Program Files/Windows XP/Accessories/wordpad.exe
JAVA_SERVICE_EXTRA_OPTIONS=-Xrs
1.1.1.3 The config Directory
The config directory is located at IntradocDir/config. The default location of
IntradocDir is DomainHome/ucm/short-product-id, but the IntradocDir
directory can be located elsewhere (as defined in the intradoc.cfg file).
Table 12 describes the contents of the config directory.
Table 1–1 Contents of the bin Directory for Startup Files
Element Description
Executables Services
IdcServer
IdcServerNT
Applet
IntradocApp (launches all Admin tools)
Utilities
BatchLoader
Installer
IdcAnalyze
ComponentWizard
SystemProperties
IdcCommand
intradoc.cfg file Configuration file that contains the settings for Content Server
services, applets, and utilities
Note: If Content Server is set up as an automatic service and you
attempt to start a Content Server service (IdcServer or
IdcServerNT) from the command line, you will receive an error
message: The port could not be listened to and is
already is use.
Table 1–2 Contents of the config Directory
File Description
config.cfg Defines system configuration variables.
Overview of Content Server Architecture
1-4 Oracle WebCenter Content Developer's Guide for Content Server
The config.cfg file is used to define global variables for the Content Server system.
Several of these variables can be set using the WebCenter Content System Properties
utility or by modifying the variables on the Admin Server General Configuration page.
Example 1–2 shows a typical config.cfg file.
Example 1–2 config.cfg File
<?cfg jcharset="Cp1252"?>
#Content Server System Properties
IDC_Name=idcm1
SystemLocale=English-US
InstanceMenuLabel=JeanWTestSystem
InstanceDescription=idcm1
SocketHostAddressSecurityFilter=127.0.0.1|10.10.1.14
#Database Variables
IsJdbc=true
JdbcDriver=com.internetcds.jdbc.tds.Driver
JdbcConnectionString=jdbc:freetds:sqlserver://jwilsonnote:1433/oracle1;charset=UTF
8;TDS=7.0
JdbcUser=sa
JdbcPassword=UADle/+jRz7Fi8D/VzTDaGUCwUaQgQjKOQQEtI0PAqA=
JdbcPasswordEncoding=Intradoc
DatabasePreserveCase=0
#Internet Variables
HttpServerAddress=jwilsonnote
MailServer=mail.example.com
SysAdminAddress=sysadmin@example.com
SmtpPort=25
HttpRelativeWebRoot=/oracle/
CgiFileName=idcplg
UseSSL=No
WebProxyAdminServer=true
NtlmSecurityEnabled=No
UseNtlm=Yes
#General Option Variables
EnableDocumentHighlight=true
EnterpriseSearchAsDefault=0
IsDynamicConverterEnabled=0
IsJspServerEnabled=0
JspEnabledGroups=
#IdcRefinery Variables
#Additional Variables
WebServer=iis
UseAccounts=true
IdcAdminServerPort=4440
SearchIndexerEngineName=DATABASE
VIPApproval:isRepromptLogin=true
Vdk4AppSignature=SF37-432B-222T-EE65-DKST
Vdk4AppName=INTRANET INTEGRATION GROUP
IntradocServerPort=4444
Overview of Content Server Architecture
Introduction to Oracle WebCenter Content Server 1-5
1.1.1.4 The components Directory
The IntradocDir/data/components directory contains the files that Content
Server uses to configure system components. Table 13 describes the contents of the
components directory.
Example 1–3 shows a component.hda file that defines the configuration status for a
component called help.
Example 1–3 component.hda File
<?hda version="11.1.1.2.0-dev idcprod1 (091209T125156)" jcharset=UTF8
encoding=utf-8?>
@Properties LocalData
blDateFormat=M/d{/yy} {h:mm[:ss] {aa}[zzz]}!tAmerica/Chicago!mAM,PM
@end
@ResultSet Components
2
name
location
help
components/help/help.hda
@end
1.1.1.5 The resources Directory
The IdcHomeDir/resources directory contains two directories: admin and core.
The resources/core directory contains files that Content Server uses to assemble
web pages. Table 14 describes the subdirectories of the resources/core directory.
Table 1–3 Contents of the data/components Directory
File Description
idcshort-product-id_
components.hda
Identifies components that have been added to the Content
Server system and whether they are enabled or disabled.
Example: idccs_components.hda.
component.hda Identifies the configuration status for a component.
Table 1–4 Contents of the resources/core Directory
Subdirectory Description
config Holds base configuration files for Content Server.
idoc Holds IdocScript dynamichtml and dynamicdata definitions.
install Holds files that are used by the installer and related
applications.
javascript Holds files that are processed by the publishing engine and end
up in the weblayout directory as raw JavaScript files.
jspserver Holds jspserver XML files.
lang Holds localized string definitions for Content Server.
reports Holds templates for Content Server reports.
resources Holds resource definitions (queries, page resources, services,
and other resource data) for Content Server.
tables Holds IdocScript resource table definitions.
templates Holds templates for all Content Server pages (except reports).
Overview of Content Server Architecture
1-6 Oracle WebCenter Content Developer's Guide for Content Server
Table 15 describes the subdirectories of the resources/admin directory.
1.1.1.6 The weblayout Directory
The DomainHome/ucm/short-product-id/weblayout directory contains the
files that are available to the web server for display on the various pages of the
Content Server web site. Table 16 describes the subdirectories of the weblayout
directory.
1.1.2 Resources
Resources are files that define and implement the actual customization you make to
Content Server. They can be pieces of HTML code, dynamic page elements, queries
that gather data from the database, services that perform Content Server actions, or
special code to conditionally format information.
Resources are a critical part of the Content Server software, so you must be familiar
with them before you attempt to create a custom component or dynamic server page.
You can create, edit, or remove a resource file by using the Component Wizard. You
also can use the Component Wizard as a starting point for creating custom resources.
Resources fall into distinct categories, which table describes. The first five types listed
in the table are also called resource-type resources. Table 1–7 describes these resource
types.
Table 1–5 Contents of the resources/admin Directory
Subdirectory Description
idoc Holds IdocScript dynamichtml and dynamicdata definitions.
tables Holds IdocScript resource table definitions.
templates Holds templates for all Content Server pages (except reports).
Table 1–6 Contents of the weblayout Directory
Subdirectory Description
groups Holds the web-viewable content items and dynamic server
pages.
images Holds images, such as icons and home page graphics.
resources Holds layouts, skins, and schema information.
Customization Types
Introduction to Oracle WebCenter Content Server 1-7
1.2 Customization Types
Three major types of alterations can be made to Content Server:
Altering the look and feel of the product
You can customize the look and feel of the Content Server interface to meet your
organization's specifications. Interface modifications can be as simple as replacing
the icons that appear on the standard Content Server web pages or as complex as a
complete redesign of the interface.
Modifying the functionality of the product
By changing how the product functions, you can tailor Content Server to the way
your business or organization functions. For example, you can change the default
date and time stamp, or change aspects of check-in behavior.
Integrating the product into your environment
You can use shell scripts, SOAP, J2EE, JSP, and clusters to more fully integrate
Content Server into your site's current environment.
Table 1–7 Resource Types
Resource Type Description Example of Standard Resource
HTML Include Defines pieces of HTML markup
and Idoc Script code that are used
on multiple Content Server web
pages.
IdcHomeDir/resources/core/idoc/std_
page.idoc
Dynamic Data
Table Defines a table of data in a
dynamicdata include from within
IdocScript to load an HTML table
definition, interface menu actions,
or information about metadata
fields or from within Java code as
an alternative to static tables loaded
into SharedObjects.
IdcHomeDir/resources/core/idoc/std_
data.idoc
String Defines localized strings for the
user interface and error messages.
IdcHomeDir/resources/core/lang/cs_
strings.htm
Dynamic Table
(HDA format) Provides dynamic (frequently
changed) content in table format to
Content Server.
IdcHomeDir/resources/core/templates/templat
es.hda
Static Table
(HTML format) Provides static (seldom changed)
content in table format to Content
Server.
IdcHomeDir/resources/core/tables/std_
locale.htm
Query Defines database queries. IdcHomeDir/resources/core/tables/query.htm
Service Defines scripts for services that can
be performed by Content Server.
IdcHomeDir/resources/core/tables/std_
services.htm
Template Defines templates, which contain
the code that Content Server uses to
assemble a particular web page.
IdcHomeDir/resources/core/templates/checkin
_new.htm
Environment Defines configuration settings for
Content Server.
IntradocDir/config/config.cfg
Customization Planning
1-8 Oracle WebCenter Content Developer's Guide for Content Server
1.3 Customization Planning
Before approaching customization, it is important to clarify exactly why the
customization is being undertaken. For example, to add corporate branding, you can
use the Modify Layout Samples to do so. Or to change security features, you can use
components to modify the default security settings.
Customization often occurs to make Content Server match the business practices of an
organization. Often, after evaluating your business processes, you may find that
sometimes it is more efficient to slightly alter your procedures before customizing
Content Server.
There are six major stages in customization:
1. Determine why you want to customize.
Is there corporate personalization to be done? Is there a better way to present
navigation options or material? Depending on what type of need you find, you
can determine which tools are best to use.
Oftentimes the cosmetic details that you change are the ones that can most satisfy
your users; changing items such as layout, colors, and images often provide the
effect that users are looking for.
2. Plan the customization carefully.
Take into account those aspects of the Content Server environment that might be
changed even peripherally by the customization. All customization should be
done in a test environment, separate from the site's production environment.
3. Check to see if a solution may be available.
The samples on the Support web site contain many types of customizations. You
might be able to use an existing component with just a little editing. A number of
samples are provided on an as-is basis. These are components or files that
demonstrate, enhance, or extend the functionality of WebCenter Content.
4. Evaluate the problem and how essential it is to solve.
Some problems might require more effort to fix than the resulting payback.
Perhaps customization is not needed, but simply a minor change in business
practices.
5. Test the customization thoroughly in a separate environment.
If possible, have end users assist with the testing. When the testing has passed all
criteria for release, inform users about the changes and how to implement them.
6. Document the customization that you create.
All alterations should be documented as completely as possible, both within the
actual customization (for example, as a comment in a dynamic server page or in a
component) and as a separate README document. This documentation provides a
historical audit trail for others who might need to add to the customization later.
Recommended Skills and Tools for Customizing Content Server
Introduction to Oracle WebCenter Content Server 1-9
1.4 Recommended Skills and Tools for Customizing Content Server
Content Server brings together a wide variety of technologies to deliver advanced
functionality. To modify Content Server, certain experience and skills with some or all
of these technologies are required.
The technical skills required to customize Content Server can vary depending on the
complexity of the customization. For example, much customization can be
accomplished with knowledge of HTML and Idoc Script.
This list describes, in descending order of importance, the technologies and experience
you might need to modify Content Server:
Content Server architecture
You should thoroughly understand how Content Server works and how
components and dynamic server pages function before you begin customizing
your system.
HTML and cascading style sheets (CSS)
You will need a good understanding of HTML and CSS to make changes to the
Content Server web page templates. The templates are not complex in their use of
HTML, but they make constant use of HTML tables and frequent use of forms. The
std_page.idoc and std_css.idoc files include cascading style sheets to
control the look and feel of the default templates, including fonts and layouts.
Idoc Script
Idoc Script is the custom, server-side scripting language for Content Server.
Almost every Content Server web page includes some Idoc Script code, which
provides the methods for processing various page elements.
JavaScript
The internal content of most Content Server pages do not use JavaScript, but the
Search, Check-In, and Update pages are notable exceptions. You must have an
understanding of JavaScript before you create a customization that is called in
place of these pages. Also, you must understand JavaScript to alter layouts.
Changing layouts relies heavily on JavaScript and cascading style sheets for design
and navigation.
Structured Query Language (SQL)
Content Server uses SQL to perform queries on the database. Knowledge of SQL
can help you understand the standard queries and create your own custom
queries.
Java programming
Content Server is implemented with Java classes. You should have a thorough
understanding of Java and the Content Server Java class files before attempting to
make any changes to the underlying functionality. However, you can customize
the product extensively without working with Java.
Other programming
Experience with other tools, such as Visual Basic, COM, .Net, C++, or VBScript,
might be helpful if you are doing complex customization or integrating
WebCenter Content with other systems.
Content Server Behavior
1-10 Oracle WebCenter Content Developer's Guide for Content Server
You may find the following tools useful when customizing Content Server:
Text editor
Most product customizing can be done with a normal text editor, such as
Microsoft WordPad or vi.
HTML editor
If you prefer to use a graphical HTML editor to work with HTML pages, use a
nongraphical mode for editing.
Multiple browsers
You should test customization on multiple versions of any web browsers that
might be used to interface with the content management system. Internet Explorer,
Firefox, and Chrome do not display content in the same manner, and different
versions of the same browser may exhibit different behaviors.
JavaScript debugger
A JavaScript debugger can ease the task of JavaScript development. A number of
JavaScript debuggers are available for download from the Internet.
Integrated Development Environment (IDE) for Java
If your customization requires the development of Java code, you need an
appropriate Java development environment.
1.5 Content Server Behavior
Before you customize WebCenter Content, you need to understand the behavior of
Oracle WebCenter Content Server:
Startup behavior
Resource caching
Page assembly
Database interaction
Localized string resolution
Application integrations
For an overview of Content Server, see "Introduction to Content Server
Administration" in the Oracle WebCenter Content System Administrator's Guide for
Content Server.
Caution: Graphical HTML editor programs often change the source
HTML, which can cause Idoc Script tags to be converted into strings
of characters that are no longer recognized by Content Server. If you
use a graphical editor, make sure you edit in a nongraphical mode.
Content Server Behavior
Introduction to Oracle WebCenter Content Server 1-11
1.5.1 Startup Behavior
During startup, a Content Server instance performs internal initialization and loads
these items:
1. Configuration variables
2. Standard templates, resources, and reports
3. Custom components, including templates, resources, configuration variables, and
reports
Figure 1–1 illustrates the four steps that Content Server goes through during startup.
Section 1.5.1.1, "Startup Steps," describes each step in more detail.
Figure 1–1 Content Server Startup Behavior
1.5.1.1 Startup Steps
During startup, Content Server goes through these steps:
1. Internal initialization occurs.
When Content Server initializes internally, the Java class files from Content Server
are read and the Java Virtual Machine (JVM) is invoked. Any variables in the
DomainHome/ucm/short-product-id/intradoc.cfg file are initialized as
well.
2. Configuration variables load.
After initialization, Content Server loads the config.cfg file from the
IntradocDir/config directory. This file stores the system properties and
configuration variables, which are defined by name/value pairs (such as
SystemLocale=English-US).
Content Server Behavior
1-12 Oracle WebCenter Content Developer's Guide for Content Server
The default information contained within the configuration file was supplied
during the Oracle WebCenter Content installation process, but you can modify this
file in several ways:
Use the Admin Server General Configuration page, accessible from the
Administration menu
Run the SystemProperties executable, located in the bin directory of the
Oracle WebCenter Content installation (UNIX operating system)
Edit the configuration files directly
Use a custom component
Any time changes are made to the config.cfg file, you must restart Content
Server for the changes to take effect.
3. Standard resources, templates, and reports load.
For Content Server to function properly, many standard resources, templates, and
reports must be loaded. After the configuration settings have been loaded, Content
Server reads the entries in the
IdcHomeDir/resources/core/templates/templates.hda file and the
IdcHomeDir/resources/core/reports/reports.hda file. These files tell
Content Server which templates to load, which in turn loads any standard
resources referenced in the template and report pages.
4. Custom components load.
Content Server loads all of the components listed in
IntradocDir/data/components/idcshort_product_id_
components.hda, and in turn that loads system components out of
IdcHomeDir/components/ComponentName/ComponentName.hda or, for
custom components, out of
IntradocDir/custom/ComponentName/ComponentName.hda.
1.5.1.2 Effects of Configuration Loading
It is important to understand the effect of the load order for the different configuration
files because if a variable is set in more than one file, the last variable loaded takes
precedence. For example, the IntradocDir/config/config.cfg file is loaded
before the IntradocDir/data/components/component_name/config.cfg file,
so the component_name/config.cfg can change the value of a variable that was
set by the config/config.cfg file.
Files are loaded in this order (not all files exist for each component):
1. DomainHome/ucm/short-product-id/bin/intradoc.cfg
2. IntradocDir/config/config.cfg
3. DomainHome/ucm/short-product-id/custom/component_name/*_
environment.cfg
Some components might not have this file, or it might be named
environment.cfg.
4. IntradocDir/data/components/component_name/install.cfg
5. IntradocDir/data/components/component_name/config.cfg
6. DomainHome/ucm/short-product-id/bin/intradoc.cfg
This file is reread at the end of startup to allow overrides to other settings.
Content Server Behavior
Introduction to Oracle WebCenter Content Server 1-13
If, for example, the same variable was set in each of the files in the list, the variable’s
value in intradoc.cfg would take precedence because this file was loaded last.
To view the configuration, you can use the GET_SYSTEM_AUDIT_INFO service to
show all configuration entries and where they were set.
To change a component variable, you can use the Update Component Configuration
area in the Advanced Component Manager. This area displays a dropdown list of
components that have editable configurations in the component_name/config.cfg
file. You can choose a component and click Update to get to the Update Component
Configuration page in Content Server.
You can also edit the configuration file manually. If a component is not displayed in
the Update Component Configuration list in the Advanced Component Manager, you
can make your changes directly in one of the configuration files.
1.5.2 Resource Caching
Content Server handles caching for template pages and resources as follows:
When Content Server loads template pages and resources, they are cached in
memory to accelerate page presentation.
If you change a template page, report page, or HTML include resource, or you
check in a revision to a dynamic server page, your changes go into effect
immediately.
The next request for the associated web page or refresh of the page reflects the
changes, and the new information is cached. This occurs because pages are
assembled dynamically for each page request. You can disable this behavior to
improve performance by setting the configuration variable
DisableSharedCacheChecking.
If you change any other component file (including services, queries, environment
variables, tables, the idcshort-product-id_components.hda file, and the
template.hda file), you must restart Content Server before the changes go into
effect. Such changes could cause Content Server to malfunction if they were
implemented immediately.
You do not need to restart Content Server after changing strings; however, you
must republish the ww_strings.js files by clicking publish string and dynamic
files or publish string, static, and dynamic files in the Weblayout Publishing area
of the Admin Actions page. For more information, see Chapter 9, "Getting Started
with Content Server Components."
1.5.3 Page Assembly
Content Server uses the following information from the files in the
IdcHomeDir/resources directory to assemble dynamic web pages:
The structure and format of a web page
This structure and format are defined by a particular HTML template file. The
template files are primarily in the resources/core/templates directory, and
some templates are in the resources/core/reports and
resources/admin/templates directories.
The templates reference resources
These resources are located in .htm and .idoc files in subdirectories of the
resources directory. Resources can include HTML and Idoc Script markup,
Content Server Behavior
1-14 Oracle WebCenter Content Developer's Guide for Content Server
localized strings, queries to gather information from the database, and special
code to conditionally format the information.
As a rule, each web page includes the following resources:
Standard page header
Standard page beginning
Standard page ending
Because all of the Content Server resources are cached in memory at startup, Content
Server has a definition for the standard pieces that appear on the page. Content Server
then combines the standard resources with the unique resources specified in the
template to create the web page.
For dynamic server pages, the template page and custom resource files are checked
into Content Server. When one of these pages is requested by a web browser, Content
Server recognizes the file extension as a dynamic server page, which enables special
processing. At that point, the page assembly process is the essentially the same as the
standard process, except that the page can use both the standard resources in the
resources directory and the custom resources that are checked in to Content Server.
1.5.4 Database Interaction
Some databases, such as Oracle Database, return all column names in uppercase
characters. Therefore, when Content Server receives query results from these
databases, column names must be mapped from the uppercase characters to the values
used in Content Server.
Because of this case mapping issue, custom components created for a Content Server
instance using one database might not work correctly on a Content Server instance
using a different database.
To map column names, the IdcHomeDir/resources/core/resources/upper_
clmns_map.htm file contains a mapping table named ColumnTranslation. Add
the query values to this file when you create a component that accesses fields that are
not WebCenter Content database fields (for example, if you create a component that
accesses a custom table within the WebCenter Content database).
For information about using the upper_clmns_map.htm file, see Section 5,
"Changing System Settings."
1.5.5 Localized String Resolution
Localized strings are the means by which the user interface and error messages are
presented in the language specified by the user's locale. Content Server loads the
string resource files for a base language and also loads resource files for every
supported language. Instead of presenting hard-coded text, the template pages,
applets, and error messages reference string IDs in these resource files, which are then
resolved using the ExecutionContext that contains the locale information for the user.
1.5.6 Application Integrations
Content Server not only serves as a content management solution for content-centric
web sites, but also provides a scalable content management infrastructure that
supports multiple enterprise applications in many diverse environments and
platforms. The integration solutions enable other enterprise applications to access
content managed by the content management system and provides these applications
with critical content management capabilities such as full-text and metadata searching,
Content Server Behavior
Introduction to Oracle WebCenter Content Server 1-15
library services, workflow, subscription notifications, and content conversion
capabilities through a wide array of integration methods.
For information about integrating Content Server with enterprise applications, see
Section 18, "Getting Started with Integrating WebCenter Content into Your
Environment."
Content Server Behavior
1-16 Oracle WebCenter Content Developer's Guide for Content Server
2
Introduction to the Oracle Fusion Order Demo Sample Application 2-1
2Introduction to the Oracle Fusion Order
Demo Sample Application
This chapter describes the Oracle Fusion Order Demo sample application, how to set it
up, and how to run the Suppliers Module.
This chapter includes the following sections:
Section 2.1, "About Fusion Order Demo and the Suppliers Module"
Section 2.2, "Setting Up the Fusion Order Demo Application"
Section 2.3, "Running the Suppliers Module"
The instructions in this chapter are for setting up and running the sample application
on Oracle WebLogic Server. Content Server can also be deployed to an IBM WebSphere
Application Server. For more information, see "Managing Oracle WebCenter Content
on IBM WebSphere" in the Oracle Fusion Middleware Third-Party Application Server
Guide.
2.1 About Fusion Order Demo and the Suppliers Module
In the Oracle Fusion Order Demo sample application, electronic devices are sold
through a storefront web application. Customers can visit the web site, register, and
place orders for products.
To view and run the demo, you need to install Oracle JDeveloper 11g. Then you need
to download the application for the demonstration. For instructions to complete these
tasks, see Section 2.2, "Setting Up the Fusion Order Demo Application."
After the application is installed and running, you can view the code using Oracle
JDeveloper. You can view the application at runtime by logging in as an existing
customer and placing an order.
The Suppliers module of Fusion Order Demo demonstrates the use of Java EE to create
web applications for a web supplier management system. The demonstration
application is used to illustrate points and provide code samples.
The Suppliers module consists of a business services project named Model and a web
user interface project named ViewController. You run the Suppliers module of the
Fusion Order Demo application in JDeveloper by running the ViewController
project. The ViewController project uses JavaServer Faces (JSF) as the view
technology, and the project relies on the ADF Model layer to interact with the EJBs in
the Model project. To learn more about the Suppliers module and to understand its
implementation details, see Section 2.3.1, "Suppliers Module Code" and Section 2.3.2,
"Suppliers Module Pages."
Setting Up the Fusion Order Demo Application
2-2 Oracle WebCenter Content Developer's Guide for Content Server
2.2 Setting Up the Fusion Order Demo Application
The Fusion Order Demo application runs using an Oracle database and Oracle
JDeveloper 11g. The platforms supported are the same as those supported by
JDeveloper.
To set up the Fusion Order Demo application:
1. Install Oracle JDeveloper 11g and meet the installation prerequisites. The Fusion
Order Demo application requires an existing Oracle database.
2. Install the Fusion Order Demo application from the Oracle Technology Network.
3. Install Mozilla FireFox, version 2.0 or higher, or Internet Explorer, version 7.0 or
higher.
4. Run the application on a monitor that supports a screen resolution of 1024 X 768 or
higher.
For more information, see "Setting Up the Fusion Order Demo Application" in the
Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development
Framework.
2.3 Running the Suppliers Module
To run the Suppliers module of the Fusion Order Demo application:
1. Download and install the Fusion Order Demo application as described in "Setting
Up the Fusion Order Demo Application" in the Oracle Fusion Middleware Fusion
Developer's Guide for Oracle Application Development Framework.
2. Open the application in Oracle JDeveloper:
a. From the JDeveloper main menu, choose Open from the File menu.
b. Navigate to the location to which you extracted the demo ZIP file, select the
SupplierModule_2.0.jws application workspace from the SupplierModule
directory, and click Open.
Figure 2–1 shows the Application Navigator after you open the file for the
application workspace. For a description of each of the projects in the
workspace, see Section 2.3.1, "Suppliers Module Code."
Figure 2–1 The Suppliers Module Projects in Oracle JDeveloper
Running the Suppliers Module
Introduction to the Oracle Fusion Order Demo Sample Application 2-3
3. In the Application Navigator, click the Application Resources accordion title to
expand the panel.
4. In the Application Resources panel, expand the Connections and Database nodes.
5. Right-click FOD connection and choose Properties.
6. In the Edit Database Connection dialog, modify the connection information shown
in Table 21 for your environment.
Do not modify the user name and password fod/fusion. These must remain
unchanged. Click OK.
7. In the Application Navigator, right-click Model and choose Rebuild.
8. In the Application Navigator, right-click ViewController and choose Run.
The login.jspx page is displayed. Because of the way security is configured in
this module, you must first log in.
9. Enter SHEMANT for User Name and welcome1 for Password.
Once you log in, the browse page appears, which allows you to search for products.
Once you select a product in the results table, you can edit or remove the product
information. Using the command links at the top of the page, you can edit the
corresponding supplier’s information, or add a new supplier. For more information
about the Suppliers module at runtime, see Section 2.3.2, "Suppliers Module Pages."
2.3.1 Suppliers Module Code
Once you have opened the projects in Oracle JDeveloper, you can then begin to review
the artifacts within each project. The Model project contains the Java classes and
metadata files that allow the data to be displayed in the web application. The
oracle.fodemo.common project contains components used by multiple classes in
the application. The oracle.fodemo.supplier project contains the components
used to access the supplier data. Figure 2–2 shows the Model project and its associated
directories.
Table 2–1 Connection Properties Required to Run the Fusion Order Demo Application
Property Description
Host Name The host name for your database. For example:
localhost
JDBC Port The port for your database. For example:
1521
SID The SID of your database. For example:
ORCL or XE
Running the Suppliers Module
2-4 Oracle WebCenter Content Developer's Guide for Content Server
Figure 2–2 The Model Project in JDeveloper
The ViewController project contains the files for the web interface, including the
backing beans, deployment files, and JSPX files. The Application Sources node
contains the code used by the web client, including the managed and backing beans,
property files used for internationalization, and the metadata used by Oracle ADF to
display bound data. The Web Content node contains web files, including the JSP files,
images, skin files, deployment descriptors, and libraries. Figure 2–3 shows the
ViewController project and its associated directories.
Running the Suppliers Module
Introduction to the Oracle Fusion Order Demo Sample Application 2-5
Figure 2–3 The ViewController Project in JDeveloper
2.3.2 Suppliers Module Pages
The Supplier module contains eight main pages that enable a user to perform these
tasks:
Search for products: The browse.jspx page enables a user to search for products.
Search results are displayed in a table. Figure 2–4 shows the search form on the
browse page.
Figure 2–4 Search Form in Supplier Module
Running the Suppliers Module
2-6 Oracle WebCenter Content Developer's Guide for Content Server
Edit row data in a table: From the table on the browse.jspx page, a user can
select a product and choose Update to navigate to the productInfo.jspx page
(clicking the product link also navigates to this page). From the table, a user can
also click Remove, which launches a popup that allows the removal of the selected
product. Figure 2–5 shows the table on the browse page.
Figure 2–5 Table on the browse Page
Edit row data in a form: From the productInfo.jspx page, a user can change
the data for a row. A selection list contains valid values for the product status. The
Choose File button enables a user to upload a graphic file, which is then displayed
below the form. Figure 2–6 shows a productInfo.jspx page.
Figure 2–6 Product Details Page
The Add Supplier link takes the user to a series of pages contained within the
regisrationDetails.jspx page that are used to create a new supplier, as
shown in Figure 2–7.
Running the Suppliers Module
Introduction to the Oracle Fusion Order Demo Sample Application 2-7
Figure 2–7 Create a Supplier Train
Log in to the application: The login.jspx page allows users to log in to the
application. For more information, see "Enabling ADF Security in a Fusion Web
Application" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle
Application Development Framework.
Running the Suppliers Module
2-8 Oracle WebCenter Content Developer's Guide for Content Server
Part II
Part II Changing the Look and Feel of the
Content Server Interface
This part provides information about the several different methods that you can use to
change the appearance and navigation of the Oracle WebCenter Content Server
interface.
Part II contains the following chapters:
Chapter 3, "Customizing the Content Server Interface"
Chapter 4, "Creating Dynamic Server Pages"
3
Customizing the Content Server Interface 3-1
3Customizing the Content Server Interface
This chapter provides information about the several different methods that you can
use to customize the look and feel of the Oracle WebCenter Content Server interface.
You can use skins and layouts to change the appearance of the user interface and
dynamic server pages to change the navigation.
This chapter includes the following sections:
Section 3.1, "About Customizing the Content Server Interface"
Section 3.2, "Choosing a Different Skin or Layout"
Section 3.3, "Configuring a Default Skin and Layout for New Users and Guests"
Section 3.4, "Modifying the Template for a Skin or Layout"
Section 3.5, "Altering the Anonymous User Interface"
Section 3.6, "Changing the URL of the Login Page"
Section 3.7, "Creating and Publishing a New Layout"
Section 3.8, "Optimizing the Use of Published Files"
3.1 About Customizing the Content Server Interface
Skins and layouts provide alternate color schemes and alternate navigation designs.
3.1.1 Types of Skins and Layouts
Some skins and layouts are provided by default with Oracle WebCenter Content
Server. In addition, you can design custom skins and layouts. When you change the
skin or layout, you change the look and feel of the interface. You can select a skin and
layout from the options provided on the User Profile page.
The only skills required to create and modify skins or layouts is an understanding of
HTML, Cascading Style Sheets, and JavaScript. After altering the appearance, the
edited layouts and skins are published so that others in your environment can use
them.
Tip: In addition to using the methods discussed in this chapter, you
can alter the metadata fields that are presented to users and modify
the types of presentations used for check-in pages, search pages, and
other user interfaces. For information about creating and modifying
metadata fields and creating content profiles, see "Managing
Repository Content" in the Oracle WebCenter Content Application
Administrator's Guide for Content Server.
Choosing a Different Skin or Layout
3-2 Oracle WebCenter Content Developer's Guide for Content Server
3.1.2 Skins
Skins define the color scheme and other aspects of appearance of the layout such as
graphics, fonts, or font size. (the default skin is Oracle). You can design custom skins
or modify the existing skins.
3.1.3 Layouts
Layouts define the navigation hierarchy display (the default layout is Trays) and
custom layouts can be designed.
Custom layouts change behavior and the look-and-feel systemwide. If you want your
changes to apply only in limited situations, you might want to consider dynamic
server pages.These layouts are provided:
Trays : This layout with the standard Oracle skin is the default interface. High-level
navigation occurs through the navigation trays.
Top Menus: This layout provides an alternate look with top menus providing
navigation.
3.2 Choosing a Different Skin or Layout
You can choose a different skin to provide an alternate color scheme or a different
layout to provide an alternate navigation design, or both.
3.2.1 How to Choose a Different Skin or Layout
The User Personalization settings available on the User Profile page enable users to
change the layout of Content Server or the skin.
To choose a different skin or layout:
1. On the Content Server Home page, click your_user_name in the top menu bar.
The User Profile page appears.
2. Choose the desired skin and layout.
3. Click Update, and view the changes.
3.2.2 What Happens at Runtime
After you choose a different skin or layout, it becomes the user interface for Content
Server whenever you log in.
Note: Only administrators can make new or custom skins. For more
information about setting the default look and feel of the user
interface, see Section 3.3, "Configuring a Default Skin and Layout for
New Users and Guests."
Important: This personalization functionality works with Internet
Explorer 7+ or Mozilla Firefox 3+ and later versions.
Modifying the Template for a Skin or Layout
Customizing the Content Server Interface 3-3
3.3 Configuring a Default Skin and Layout for New Users and Guests
These values can be placed in the IntradocDir/config/config.cfg file to alter
the default behavior for the Content Server instance:
LmDefaultSkin: The name of the skin used by guests, and new users. The default
is Oracle.
LmDefaultLayout: The name of the layout used by guests, and new users. The
default is Trays, but it can be set to Top Menus.
3.4 Modifying the Template for a Skin or Layout
The Top Menus and Trays layouts are included by default with the system. The two
layouts have two skin options (Oracle and Oracle2). The layouts are written in
JavaScript, and the look of the skins is created using Cascading Style Sheets.
You can modify skins and layouts by altering the template files provided with Content
Server or design new skins and layouts by creating components that can be shared
with other users.
3.4.1 About Dynamic Publishing
When Content Server starts, or when the PUBLISH_WEBLAYOUT_FILES service is run,
the PublishedWeblayoutFiles table in the std_resource.htm file is used to
publish files to the weblayout directory. To have your custom component use this
publishing mechanism, create a template, and then merge a custom row that uses that
template into the PublishedWeblayoutFiles table.
Other users who want to modify or customize your file can override your template or
your row in the PublishedWeblayoutFiles table. If your template uses any
resource includes, other users can override any of these includes or insert their own
Idoc Script code using the standard super notation. When your component is
disabled, the file is no longer published or modified and Content Server returns to its
default state.
In addition to giving others an easy way to modify and add to your work, you can also
construct these former static files using Idoc Script. For example, you can have the files
change depending on the value of a custom configuration flag. You can use core
Content Server objects and functionality by writing custom Idoc Script functions and
referencing them from inside your template.
Because this Idoc Script is evaluated once during publishing, you cannot use Idoc
Script as you would normally do from the
IdcHomeDir/resources/core/idoc/std_page.idoc file. When a user requests
that file, it has already been created, so the script that was used to create it did not
have any access to the current service’s DataBinder object or to any information
about the current user.
This does limit the type of Idoc Script you can write in these files. If you are writing
CSS or JavaScript that needs information that dynamically changes with users or
services, consider having the pages that need this code include the code inline. This
increases the size of pages delivered by your web server and so increases the amount
of bandwidth used.
Altering the Anonymous User Interface
3-4 Oracle WebCenter Content Developer's Guide for Content Server
3.5 Altering the Anonymous User Interface
The ExtranetLook component can be used to change the interface for anonymous,
random users. An example of this is when a web site based on Content Server must be
available to external customers without a login, but you want employees to be able to
contribute content to that web site.
When Content Server is running on Oracle WebLogic Server, the ExtranetLook
component alters privileges for certain pages so that they require write privilege to
access. The component also makes small alterations to the static portal page to remove
links that anonymous, random users should not see.
The ExtranetLook component is installed (disabled) with Content Server. To use the
component, you must enable it with the Component Manager.
You can customize your web pages to make it easy for customers to search for content,
and then give employees a login that permits them to see the interface on login. To do
the customization, modify the ExtranetLook.idoc file, which provides dynamic
resource includes that can be customized based on user login. The IDOC file is
checked in to the Content Server repository so it can be referenced by the Content
Server templates.
3.5.1 How to Alter the Anonymous User Interface
You can update the look and feel of the anonymous user interface for the Content
Server web site by altering the following files in the IntradocDir/data/users
directory:
prompt_login.htm
access_denied.htm
report_error.htm
To alter the anonymous user interface:
1. Display the Web Layout Editor.
2. From the Options menu, choose Update Portal.
3. Modify the portal page as you want to. You can use dynamic resource includes to
customize this page.
4. Click OK.
5. Customize the ExtranetLook.idoc file as you want to.
6. Check out the ExtranetLook content item from Content Server.
7. Check in the revised ExtranetLook.idoc file to Content Server.
3.5.2 What Happens at Runtime
After you modify the portal page and customize theExtranetLook.idoc file, your
design becomes the user interface for Content Server whenever a user goes to the web
site without logging in.
Note: The ExtranetLook component does not provide form-based
authentication for Oracle WebLogic Server or provide customizable
error pages.
Changing the URL of the Login Page
Customizing the Content Server Interface 3-5
3.6 Changing the URL of the Login Page
You can change the URL of the Login page for Content Server by changing its context
root, which is normally /cs/. You cannot change the URL by setting a relative context
root with the HttpRelativeWebRoot property because the value of this property
does not apply to the Login page. If you need to change the web location where users
log in, you can redeploy the WebCenter Content application with a deployment plan.
To change the URL of the Login page:
1. Log in to the Oracle WebLogic Server Administration Console as the administrator
of the domain where WebCenter Content is deployed.
2. Click Deployments under the name of your domain, in the Domain Structure area
on the left.
3. Click Oracle WebCenter Content - Content Server in the Deployments table on
the Control tab of the Summary of Deployments page.
This application may be on the second or third page of the table.
4. Note the path to the deployment plan.
If no plan is specified for your WebCenter Content instance, you can create one:
a. Click Configuration on the Settings for Oracle WebCenter Content - Content
Server page.
b. Change the value of any parameter on the Configuration tab.
c. Click Save.
d. Confirm the path to the deployment plan on the Save Deployment Plan
Assistant page, or change the path.
e. Click OK.
5. In a text editor, add lines at two places in the deployment plan:
a. Add the original_loginpage_path and original_loginerror_path
variables, each in a <variable> element of a <variable-definition>
element, as in this example:
<deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan
http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd">
<application-name>ServletPlugin</application-name>
<variable-definition>
<variable>
<name>original_loginpage_path</name>
<value>/content/login/login.htm</value>
</variable>
<variable>
<name>original_loginerror_path</name>
<value>/content/login/error.htm</value>
</variable>
<variable>
<name>SessionDescriptor_timeoutSecs_12996472139160</name>
<value>3600</value>
</variable>
Changing the URL of the Login Page
3-6 Oracle WebCenter Content Developer's Guide for Content Server
b. In the <module-descriptor> element of web.xmlin the cs.war file, add
two <variable-assignment> elements that assign the following values to
the original_loginpage_path and original_loginerror_path
variables, respectively:
*/web-app/login-config/form-login-config/form-login-page
*/web-app/login-config/form-login-config/form-error-page
For example:
<module-override>
<module-name>cs.war</module-name>
<module-type>war</module-type>
<module-descriptor external="false">
<root-element>weblogic-web-app</root-element>
<uri>WEB-INF/weblogic.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>web-app</root-element>
<uri>WEB-INF/web.xml</uri>
<variable-assignment>
<name>original_loginpage_path</name>
<xpath>/web-app/login-config/form-login-config/form-login-page</xpath>
</variable-assignment>
<variable-assignment>
<name>original_loginerror_path</name>
<xpath>/web-app/login-config/form-login-config/form-error-page</xpath>
</variable-assignment>
</module-descriptor>
</module-override>
<module-override>
6. Stop the WebCenter Content Managed Server (UCM_server1 by default), with the
stopManagedWebLogic script.
UNIX script:
DomainHome/bin/stopManagedWebLogic.sh UCM_server1
Windows script:
DomainHome\bin\stopManagedWebLogic.cmd UCM_server1
7. In the Administration Console, click Deployments under the name of your
domain.
8. Select Oracle WebCenter Content - Content Server in the Deployments table, and
click Update.
9. Select Redeploy this application using the following deployment files, make
sure the path to the deployment plan is correct, and then click Finish.
10. After the redeployment completes successfully, click Apply Changes.
11. Start the WebCenter Content Managed Server with the startManagedWebLogic
script.
UNIX script:
DomainHome/bin/startManagedWebLogic.sh UCM_server1
Windows script:
DomainHome\bin\startManagedWebLogic.cmd UCM_server1
Optimizing the Use of Published Files
Customizing the Content Server Interface 3-7
12. In the Administration Console, click Deployments.
13. Select Oracle WebCenter Content - Content Server in the Deployments table, and
from the Start menu, choose Servicing all requests.
14. After the WebCenter Content application is launched, verify that the URL of the
login page has changed.
3.7 Creating and Publishing a New Layout
The following general steps are necessary to create and publish new layouts:
1. Merge a table into the LmLayouts table in
IdcHomeDir/resources/core/tables/std_publishing.htm to define the
new layout. Define the layout ID, label, and whether it is enabled (set to 1) or not.
2. Merge a table into the PublishedWeblayoutFiles table in
IdcHomeDir/resources/core/tables/std_publishing.htm. This new
table describes the files that are created from Content Server templates and then
pushed out to the weblayout directory. Specify the necessary skin.css files to
push out to each skin directory.
3. Merge a table with the PublishedStaticFiles table in std_
publishing.htm. This lists the directories that contain files, such as images,
that should be published to the weblayout directory.
3.8 Optimizing the Use of Published Files
You can direct Content Server to bundle published files so that they can be delivered
as one, minimizing the number of page requests to the server. In addition, you can
optimize file use by referencing published pages using Idoc Script.
3.8.1 Bundling Files
Multiple resources may be packaged together into units called bundles. A bundle is a
single file containing one or more published resources. Only JavaScript and css
resources should be bundled and only with other resources of the same type. Bundling
helps reduce the client overhead when pages are loaded but increases client parse,
compile, and execute overhead. Generally, it is recommended to bundle resources that
have some thematic similarity or are expected to be included at similar times. For
example, if you know that resources A, B, and C are needed on every page, and
resources D, E, and F are needed rarely but are all needed together, it is recommended
to bundle A, B, and C together and to put D, E, and F into a separate bundle.
Almost all JavaScript resources for the Content Server core are bundled into one of two
bundles: yuiBundle.js, which contains script provided by the third-party Yahoo
User Interface library, and bundle.js, which contains the rest of the resources.
The PublishedBundles table is used for determining how resources are bundled.
Essentially a bundle is identified by its target bundlePath, which is the path name to
the bundle (relative to the weblayout directory), and a list of rules detailing which
resource classes are included or excluded. A loadOrder value in this table applies
only to the order in which the filtering rules are applied, not the order in which the
resources appear in the bundle.
Optimizing the Use of Published Files
3-8 Oracle WebCenter Content Developer's Guide for Content Server
Static weblayout file contents are cached on client machines and on web proxies,
significantly lowering the amount of server bandwidth they use. Therefore, the best
practice is to use these types of files wherever possible.
However, each static weblayout file requested by the client’s browser requires a
round-trip to the server just to verify that the client has the most up-to-date version of
the file. This occurs even if the file is cached. As the number of these files grows, so
does the number of downloads from the server for each page request.
To help minimize the number of round-trips, Content Server can bundle multiple
published files so that they are delivered as one. You can disable this feature by setting
the following configuration in the server’s IntradocDir/config/config.cfg file:
BundlePublishedWeblayoutFiles=false
Bundling is accomplished by using the PublishedBundles table in the
std_publishing.htm file, which Example 3–1 shows.
Example 3–1 PublishedBundles Table in std_publishing.htm File
<@table PublishedBundles@>
<table border=1><caption><strong>
<tr>
<td>bundlePath</td>
<td>includeClass</td>
<td>excludeClass</td>
<td>loadOrder</td>
</tr>
<tr>
<td>resources/bundle.js</td>
<td>javascript:common</td>
<td></td>
<td>128</td>
</tr>
. . .
</table>
<@end@>
The columns in this table are as follows:
bundlePath: The eventual location where the bundle is published. This path is
relative to the weblayout directory.
includeClass: This is used to determine which resources to include in a bundle.
excludeClass: This is used to determine which resources to exclude from a
bundle.
loadOrder: The order in which the includeClass and excludeClass filters
are applied.
In the previous example, files of the javascript:common class are published to a
single bundle located at resources/layouts/commonBundle.js. The contents of
all bundled files that match this class are appended to form a single file to be stored at
that location.
Note: The bundling has changed since Oracle Universal Content
Management 10g, which used a different table and had a loadOrder
value that determined the order of resources in each bundle.
Optimizing the Use of Published Files
Customizing the Content Server Interface 3-9
3.8.2 Referencing Published Files
Most published files (both bundled and unbundled) must be directly referenced from
within HTML to be included in a page. It can therefore be difficult to know exactly
which files to include for a given situation, especially when bundling can be enabled
or disabled by server administrators. A simple Idoc Script method can be used to
easily and transparently include all of the files you need on a given page.
For example, if you write a page that includes all files associated with the
javascript:common bundle (as described previously), then do not write HTML that
includes all of the files mentioned in the first table in addition to the bundle mentioned
in the second, the server is asked for each file. This negates the purpose of bundling
because the server is pinged for each file whether it actually exists or not.
Example 3–2 shows Idoc Script code, within the HEAD section for a page, to correctly
include these files on the page.
Example 3–2 Idoc Script to Reference a Bundle of Files
<$exec createPublishedResourcesList("javascript:common")$>
<$loop PublishedResources$>
<script language="JavaScript" src="<$HttpWebRoot$><$PublishedResources.path$>" />
</script>
<$endloop$>
This code fragment includes all javascript:common files even if bundling is
switched off. If javascript instead of javascript:common is passed, all files
whose class starts with javascript are included.
This PublishedResources result set is sorted by loadOrder, so files and bundles
with the lowest loadOrder are included first. Files with a greater loadOrder can
override JavaScript methods or CSS styles that were declared earlier.
Optimizing the Use of Published Files
3-10 Oracle WebCenter Content Developer's Guide for Content Server
4
Creating Dynamic Server Pages 4-1
4Creating Dynamic Server Pages
This chapter describes how to use the building blocks necessary for creating dynamic
server pages to alter the appearance and navigation of web pages.
This chapter includes the following sections:
Section 4.1, "About Dynamic Server Pages"
Section 4.2, "Altering the Appearance and Navigation of Web Pages"
Section 4.3, "Creating an IDOC File with Custom Includes for Dynamic Server
Pages"
Section 4.4, "Creating an HCST Page"
Section 4.5, "Creating an HCSP Page"
Section 4.6, "Creating an HCSF Page"
Section 4.7, "Verifying the Display of an HCST, HCSP, or HCSF Page in a Web
Browser"
4.1 About Dynamic Server Pages
Dynamic server pages are files that are checked in to Content Server and then used to
generate web pages dynamically. Dynamic server pages are typically used to alter the
look-and-feel and the navigation of web pages. For example, dynamic server pages
can be used to do these tasks:
Create web pages to be published through Content Publisher
Implement HTML forms
Maintain a consistent look-and-feel throughout a web site
Dynamic server pages include the following file formats:
IDOC: A proprietary scripting language
HCST: Hypertext Content Server Template, similar to a standard Content Server
template page stored in the IdcHomeDir/resources/core/templates
directory.
HCSP: Hypertext Content Server Page, an HTML-compliant version of the HCST
page, usually used for published content.
HCSF: Hypertext Content Server Form, similar to HCSP and HCST pages, but
containing HTML form fields that can be filled out and submitted from a web
browser
About Dynamic Server Pages
4-2 Oracle WebCenter Content Developer's Guide for Content Server
When you use dynamic server pages, Content Server assembles web pages
dynamically using a custom template (HCST, HCSP, or HCSF file) that you have
checked in to Content Server. The template calls HTML includes from a text file (IDOC
file) that you have also checked in to Content Server.
To make changes to the look-and-feel or navigation on a web page, you modify the
HCS* template page, or the IDOC file, or both, and then check in the revised files as
new revisions. Your changes are available immediately.
Using dynamic server pages with Content Server gives you these advantages:
You can introduce and test customizations quickly and easily. Simply checking
in a revision of a dynamic server page implements the changes immediately—you
do not have to restart Content Server.
Your web pages can make use of functionality not found in standard HTML. For
example, HTML forms can be submitted directly to Content Server without the
need for CGI scripts. Also, Idoc Script enables you to work directly with
environment and state information about Content Server.
You do not have to install or keep track of component files. It can be difficult to
maintain and troubleshoot components if they have a lot of files or your system is
highly customized. Dynamic server pages are easier to work with because you can
check in just a few content items that contain all of your customizations.
Customizations can be applied to individual pages. Dynamic server pages
enable you to apply customizations to a single page rather than globally, leaving
the standard Content Server page coding intact.
Keep the following constraints in mind when deciding whether to use dynamic server
pages:
Dynamic server pages cannot be used to modify core functionality of Content
Server. Dynamic server pages are most useful for customizing your web design
and form pages.
Frequent revisions to dynamic server pages can result in a large number of
obsolete content items. You should do as much work on a development system as
possible before deploying to a production instance, and you may need to delete
out-of-date pages regularly.
Figure 4–1 shows the process for generating and using a Dynamic Server Page.
About Dynamic Server Pages
Creating Dynamic Server Pages 4-3
Figure 4–1 The Dynamic Server Page Process
4.1.1 Page Types
There are four types of dynamic server pages, which are identified in Content Server
by their four-character file-name extensions:
IDOC
HCST
HCSP
HCSF
4.1.1.1 IDOC File
An IDOC file is a text file containing HTML includes that are called by HCST, HCSP,
and HCSF pages.
For more information about includes, see Chapter 9, "Getting Started with Content
Server Components."
4.1.1.2 HCST File
A Hypertext Content Server Template (HCST) file is a template page, similar to a
standard Content Server template page, that is used as a framework for assembling a
web page.
HCST pages are typically used when the content of the page itself is dynamic or
where Content Server functionality is needed, such as on a search page, search
results page, or custom check-in page.
Because this type of page consists mostly of dynamically assembled code, HCST
files are not indexed in Content Server.
Altering the Appearance and Navigation of Web Pages
4-4 Oracle WebCenter Content Developer's Guide for Content Server
4.1.1.3 HCSP File
A Hypertext Content Server Page (HCSP) file is a published web page that displays
actual web site content.
HCSP files are typically created either by generating the web page through
Content Publisher using an HCST page as a template, or by submittal of a form in
Content Server through an HCSF page.
Because this type of page contains web-viewable content, HCSP files are indexed
in Content Server.
4.1.1.4 HCSF File
A Hypertext Content Server Form (HCSF) file is similar to an HCSP file, except that it
contains HTML form fields that can be filled out and submitted from a web browser.
When a user fills out and submits a form from an HCSF page, an HCSP file is
checked in as a separate content item with metadata defined by XML elements for
the HCSF page.
Because this type of page contains web-viewable content, HCSF files are indexed
in Content Server.
For more information about HCSF pages, see Section 4.1.1.4, "HCSF File."
4.2 Altering the Appearance and Navigation of Web Pages
Although dynamic server pages are implemented in Content Server differently than
custom components, you must be familiar with WebCenter Content component
architecture concepts, particularly Content Server templates and HTML includes. For
more information, see Chapter 9, "Getting Started with Content Server Components."
Use the following basic procedure to customize your Content Server instance with
dynamic server pages:
1. Create an IDOC file with custom includes.
2. Check in the IDOC file to Content Server.
3. Create an HCST, HCSP, or HCSF file that references the IDOC file.
4. Check in the HCS* file to Content Server.
5. Display the HCS* file in your web browser by searching for it in Content Server or
linking to it from a published web page.
4.2.1 Syntax
Because the different types of dynamic server pages are interpreted and displayed
differently, the Idoc Script in the files must be coded differently. The following table
summarizes these differences.
Tip: Using dynamic server pages with Content Publisher can be a
powerful tool for web publishing. For more information, see the
Content Publisher documentation.
Altering the Appearance and Navigation of Web Pages
Creating Dynamic Server Pages 4-5
4.2.1.1 Idoc Script Expressions
For HCSP and HCSF pages, Idoc Script expressions are generally placed between
HTML comment tags. When a page is viewed statically, this placement enables a web
browser to present the page content while ignoring any dynamic code that is used to
format the content. This also enables the full-text indexing engine to successfully index
the contents of these pages.
Some examples follow.
IDOC or HCST file: <$include MyIdocExpression$>
HCSP or HCSF file: <!--$include MyIdocExpression-->
In some situations, you might want to control the opening and closing of the HTML
comment. In HCSP and HCSF files, this can be done by substituting other characters
for the dash (-) in the closing tag after an Idoc Script expression, as Example 4–1
shows.
Example 4–1 Pound Sign Delimiter for HTML Comment in HCSP or HCSF File
<!--$a="ab"##> HTML comment remains open
<a href="<!--$myUrlAsVariable##>">MyUrl</a> Static view does not see this
<!--$dummy=""--> <!—Ended the comment area-->.
In Example 4–1, the pound sign (#) is substituted for the dash (-).
Another option in HCSP and HCSF files is to substitute brackets ([]) for the opening
and closing tags (< >) of the standard HTML comment, as Example 4–2 shows. This
substitution enables an XHTML parser to properly identify all the script when viewed
statically.
Example 4–2 Bracket Delimiters for HTML Comment in HCSP or HCSF File
<!--$a="ab"--] HTML comment remains open
<a href="[!--$myUrlAsVariable--]">MyUrl</a> Static view does not see this
[!--$dummy=""--> <!—Ended the comment area-->.
File Type .idoc .hcst .hcsp .hcsf
Full Text Indexed? No No Yes Yes
Idoc Script Expressions <$ … $> <$ … $> <!--$ … -->
[!--$ … --]
<!--$ … -->
[!--$ … --]
Comparison Operators Symbols (==) Symbols (==) Special operators
(eq) Special operators
(eq)
Special Characters Symbols (&) Symbols (&) Escape sequence
(&amp;) Escape sequence
(&amp;)
Referencing Metadata Required Required Required Required
Notes: Idoc Script uses standard HTML include coding. For more
information, see Section 15.2.1, "HTML Includes."
HCST uses standard Content Server template coding. For more
information, see Section 15.2.8.1, "Template and Report Pages."
Special coding is used with HCSP and HCSF to allow the page to be
rendered both statically and dynamically, and full-text indexed.
Altering the Appearance and Navigation of Web Pages
4-6 Oracle WebCenter Content Developer's Guide for Content Server
4.2.1.2 Comparison Operators
For HCSP and HCSF pages, the standard comparison operators (such as ==) cannot be
used because of their special meaning to HTML parsers. Use the following comparison
operators in dynamic server pages.
For example, the following code evaluates whether or not the value of the variable
count is greater than 10.
4.2.1.3 Special Characters
For HCSP and HCSF pages, special characters such as the ampersand (&) cannot used
because of their special meaning to HTML parsers. You must use the standard HTML
or XML escape format (such as &amp; or &#038;).
As the following examples show, in Idoc Script, a quotation mark can be included in a
string by preceding it with a backslash escape character, but in an HCSP or HCSF
page, the quotation mark character must be represented by an HTML escape character.
IDOC or HCST file: "Enter \"None\" in this field."
HCSP or HCSF file: "Enter &quot;None&quot; in this field."
In an HCST page, a line feed is inserted using \n. In an HCSP page, insert the line feed
directly in the file or encode it in the XML using the numeric ASCII number for a line
feed.
IDOC or HCST File HCSP or HCSF File Description
== eq Tests for equality.
!= ne Tests for inequality.
< lt Tests if less than.
> gt Test if greater than.
<= le Tests if less or equal than.
>= ge Tests if greater or equal than.
IDOC or HCST File HCSP or HCSF File
<$if count > 10$>
<$"Count is greater than"$>
<$endif$>
<!--$if count gt 10-->
<!--$"Count is greater than"-->
<!--$endif-->
Note: It is especially important to use the &amp; escape character
when you call the docLoadResourceIncludes function from an HCSP or
HCSF page. For more information, see Section 4.2.2.1,
"docLoadResourceIncludes Function."
Note: You can now substitute the word join for the & string join
operator. For example, you can write [!--$a join b--] instead of [!--$a &
b--]. The first is accepted by an XML parser inside an attribute of a
element, but the second is not.
Altering the Appearance and Navigation of Web Pages
Creating Dynamic Server Pages 4-7
4.2.1.4 Referencing Metadata
For dynamic server pages, several metadata values are stored with a ref: prefix,
which makes them available to the page but does not replace ResultSet values. (This
prevents pollution of result sets by dynamic server pages.)
When you reference any of the following metadata values on a dynamic server page,
you must include the ref: prefix:
hasDocInfo
dDocName
dExtension
dSecurityGroup
isLatestRevision
dDocType
For example, the following statement determines if the document type is Page:
<$if strEquals(ref:dDocType,"Page"))$>
4.2.2 Idoc Script Functions
Two special Idoc Script functions are required for dynamic server pages:
docLoadResourceIncludes
executeService
4.2.2.1 docLoadResourceIncludes Function
To be able to use the HTML includes in an IDOC file, an HCS* file must call the
docLoadResourceIncludes function, as in the following examples. This function
loads all the includes from the specified IDOC file for use in assembling the current
page. Example 4–3 shows the format for calling this function from an HCST file.
Example 4–3 docLoadResourceIncludes Function Call in HCST File
<$docLoadResourceIncludes("dDocName=system_std_
page&RevisionSelectionMethod=Latest")$>
Example 4–4 shows the format for calling this function from an HCSP or HCSF file.
Example 4–4 docLoadResourceIncludes Function Call in HCSP or HCSF file
<!--$docLoadResourceIncludes("dDocName=system_std_
page&amp;RevisionSelectionMethod=Latest")-->
4.2.2.1.1 Requirements for Calling the docLoadResourceIncludes Function The native file
for the specified content item must have a.idoc extension.
The docLoadResourceIncludes call must be placed before the first include call
in the HCS* file. It is recommended that you place this function within the HEAD
section of the page.
You must use the correct ampersand character when you call the
docLoadResourceIncludes function from an HCS* page. For more
information, see Section 4.2.1.3, "Special Characters."
Altering the Appearance and Navigation of Web Pages
4-8 Oracle WebCenter Content Developer's Guide for Content Server
4.2.2.1.2 Parameters Use the following parameters with the
docLoadResourceIncludes function to specify which IDOC file to call.
You must define either a dDocName or a dID; do not use both parameters together.
If you define a dDocName, you must define RevisionSelectionMethod to be
Latest or LatestReleased.
If you define a dID, do not define a RevisionSelectionMethod, or define the
RevisionSelectionMethod to be Specific.
4.2.2.2 executeService Function
The executeService function executes a Content Server service from within a
dynamic server page. For example:
HCST file: <$executeService("GET_SEARCH_RESULTS")$>
HCSP or HCSF file: <!--$executeService("GET_SEARCH_RESULTS")-->
Services that can be called with the executeService function must be scriptable,
meaning that they do not require parameter input.
Scriptable services have an access level of 32 or more. For more information, see
Chapter 18, "Getting Started with Integrating WebCenter Content into Your
Environment."
For a list of standard Content Server services, see the
IdcHomeDir/resources/core/tables/std_services.htm file.
For more information about the executeService function, see the Oracle
WebCenter Content Idoc Script Reference Guide.
For more information about services, see the Chapter 18, "Getting Started with
Integrating WebCenter Content into Your Environment."
Parameter Description
dDocName Specifies the Content ID value of the IDOC file.
This parameter should always be present when the Content ID value is known.
Error messages are based on the assumption that it is present, as are other features,
such as forms.
dID Specifies the unique ID number of a particular revision of the IDOC file.
RevisionSelectionMetho
d
Specifies which revision of the IDOC file to use:
Latest: The latest checked-in revision of the document is used (including
revisions in a workflow).
LatestReleased: The latest released revision of the document is used.
Specific: Use only with dID.
Rendition Specifies which rendition of the IDOC file to use:
Primary: The primary (native) file. This is the default value in effect if no
Rendition value is specified.
Web: The web-viewable file.
Alternate: The alternate file.
Performance Tip: Use services sparingly. Too many service calls on a
page can affect performance and limit scalability.
Altering the Appearance and Navigation of Web Pages
Creating Dynamic Server Pages 4-9
4.2.3 Development Recommendations
The following recommendations to assist you in developing dynamic server pages
include general guidelines and HCSF guidelines.
4.2.3.1 General Guidelines
The following recommendations apply to the development of all types of dynamic
server pages:
Keep templates as simple and free of code as possible. Strive to have only HTML
includes in your templates, with all code and conditionals in an IDOC file. This is
especially helpful for HCSF pages, where submitted forms also reflect changes
made to the IDOC file.
Whenever you are customizing an Oracle WebCenter Content Server instance, you
should isolate your development efforts from your production system. Keep in
mind that frequent revisions to dynamic server pages can result in a large number
of obsolete content items. You should do as much work on a development system
as possible before deploying to a production instance, and you may need to delete
out-of-date pages regularly.
When you develop a web site using dynamic server pages, think of the
development and contribution processes in terms of ownership:
– Structure, including site design and navigation, is owned by the webmaster.
When you use dynamic server pages, structure is contained in and controlled
with includes that are defined in IDOC files.
–Content, that is, the actual text of the web pages, is owned by the contributors.
When you use dynamic server pages, content is contained primarily in HCSP
files that make use of the includes in the IDOC files.
Using dynamic server pages with Content Publisher can be a powerful tool for
web publishing. You can create content using Word documents or HCSF pages,
and then use Content Publisher to convert the documents to published HCSP files.
You can also use the "include before" and the "include after" options in the SCP
template to insert additional Idoc Script includes.
If you publish dynamic server pages with Content Publisher, use the prefix option
for easy identification of your documents.
Use a consistent naming convention. For example, for "system" level includes, you
could name your IDOC file system_std_page, and then name each include in
that file with the prefix system_. This makes locating the includes easier.
You may want to create a content type for each type of dynamic server page (such
as HCSF_templates or submitted_forms).
In accordance with good coding practices, you should always put comments in
dynamic server pages to document your customizations.
Altering the Appearance and Navigation of Web Pages
4-10 Oracle WebCenter Content Developer's Guide for Content Server
4.2.3.2 HCSF Guidelines
The following recommendations apply specifically to the development of HCSF pages:
When designing a form, consider how the template will be used:
Will this template change depending on the role of the user submitting the
form?
Will the submitted content enter into a criteria workflow?
What default metadata values should be set?
Does the form contain ResultSets for multiple line entries?
To see the form parameters as they are passed from the web browser to the web
server, filtered through Oracle WebCenter Content Server, and then passed back to
the web browser, change the method attribute in the include code from POST to
GET:
<form name="<$formName$>" method="GET" action="<$HttpCgiPath$>">
If you add a form field called DataScript to a form being submitted, then any Idoc
Script for that value is evaluated by Oracle WebCenter Content Server when it
processes the form.
4.2.4 HCSF Pages
In addition to following the standard formatting rules for Oracle WebCenter Content
Server templates and HTML forms, HCSF pages require several special sections and
tags that enable Oracle WebCenter Content Server to process them. These special
sections appear in the following order in a typical HCSF file:
1. Load section
2. Data section
3. Form section
For an example of a complete HCSF page, see Section 4.1.1.4, "HCSF File."
4.2.4.1 Load Section
The load section at the beginning of an HCSF page declares the file as an HTML file,
loads an IDOC file, and loads other information about the page. Example 4–5 shows a
typical load section.
Example 4–5 Load Section for an HCSF Page
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<!--$docLoadResourceIncludes("dDocName=my_idoc_
page&amp;RevisionSelectionMethod=Latest")-->
<meta NAME="idctype" CONTENT="form; version=1.0">
<!--$defaultPageTitle="Department News Form"-->
<!--$include std_html_head_declarations-->
</head>
Altering the Appearance and Navigation of Web Pages
Creating Dynamic Server Pages 4-11
The load section has these items:
HTML declaration
docLoadResourceIncludes function
meta element
Variables and includes
4.2.4.1.1 HTML Declaration The HTML declaration identifies the file as an HTML file,
with the following syntax:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4.2.4.1.2 The docLoadResourceIncludes Function The docLoadResourceIncludes function
loads all the includes from the specified IDOC file for use in assembling the current
page. For more information, see Section 4.2.4.1.2, "The docLoadResourceIncludes
Function."
4.2.4.1.3 Meta Element The meta element is used by Content Publisher to identify that
this is a special type of page.
This element is not required if the form is not being published through Content
Publisher.
The meta element must be placed inside the HEAD section of your HTML file.
Use the following syntax for the meta tag:
<meta NAME="idctype" CONTENT="form; version=1.0">
4.2.4.1.4 Variables and Includes The HEAD section for an HCSF page can contain variable
definitions and HTML includes as necessary. Example 4–6 shows lines in a HEAD
section that define the default page title and load the std_html_head_
declarations code.
Example 4–6 Variable Definition and Include in the HEAD Section for an HCSF Page
!--$defaultPageTitle="Department News Form"-->
<!--$include std_html_head_declarations-->
4.2.4.2 Data Section
The data section for an HCSF page contains rules and metadata information that is
used to process the form. There is a close relationship between the information in the
data section and the presentation of the page:
Upon delivery of the HCSF page to the user, the information in the data section is
parsed into a DataBinder object and merged into the Form Section.
Upon form submittal, the information in the data section is merged with the
request and written out again to the data section. For more information, see
Chapter 9.1.3.3, "Data Binder," and Section 9.1.3.1.1, "Elements in HDA Files."
4.2.4.2.1 Data Section Structure The data section consists of XML elements that are
placed between idcbegindata and idcenddata Idoc Script tags, as Example 4–7
shows.
Altering the Appearance and Navigation of Web Pages
4-12 Oracle WebCenter Content Developer's Guide for Content Server
Example 4–7 Data Section for an HCSF Page
<!--$idcbegindata-->
<idcformrules isFormFinished="0"/>
<model_number content="html">AB-123</model_number>
<revision>12</revision>
<!--$idcenddata-->
The following rules apply to the data section:
The data section must be placed inside the <BODY> section of your HTML file,
before the beginning of the form section.
You can place Idoc Script variable definitions and includes before or after the data
section, but not within it.
Two types of XML elements are used in the data section:
The idcformrules Element
Metadata Elements
You can also use the following types of formatting in the data section:
Nested Elements
Referencing XML Elements
Form Elements
ResultSets
4.2.4.2.2 The idcformrules Element The idcformrules element defines Content Server
rules in the data section. This element requires one attribute, either isFormFinished
or resultsets.
IsFormFinished Attribute: The isFormFinished attribute indicates whether the
form can be submitted again or not.
Use the following attribute value to specify that the form can be submitted
again:
<idcformrules isFormFinished="0"/>
Use the following attribute value to specify that the form cannot be submitted
again:
<idcformrules isFormFinished="1"/>
This code results in a read-only form.
resultsets Attribute: The resultsets attribute indicates which XML elements in the
data section are interpreted as ResultSets.
This attribute specifies one or more XML tag names separated by commas. For
example:
<idcformrules resultsets="volume,chapter">
During delivery of an HCSF page to the user, the core Content Server reads
the resultsets attribute and, if necessary, places empty ResultSets with the
specified names into the DataBinder object so that they are available for
merging.
Altering the Appearance and Navigation of Web Pages
Creating Dynamic Server Pages 4-13
For more information about ResultSet formatting in the data section, see
Section 4.2.4.2.7, "ResultSets."
4.2.4.2.3 Metadata Elements Metadata elements specify the metadata values that appear
in form fields when a form is displayed in a browser. For example:
<model_number>AB-123</model_number>
Each metadata element can be assigned a content attribute that indicates which type
of content the element contains. For example:
<model_number content="html">AB-123</model_number>
The value of the content attribute can be either html or text: Text indicates that
the content of the element should be interpreted strictly as text. HTML indicates
that the content of the element should be interpreted as HTML code.
If the content attribute is not specified for a metadata element, it defaults to
html.
Content Publisher ignores all other attributes except the content attribute.
4.2.4.2.4 Nested Elements If you are not publishing HCSF pages through Content
Publisher, you can use nested XML elements (also called nodes) within the data
section. Example 4–8 shows a <section> element nested in a <chapter> element.
Example 4–8 Nested XML Tags in a Data Section
<chapter title="Chapter 1">
This is the beginning of the chapter.
<section title="First Section">
This is the first section of the chapter.
</section>
</chapter>
4.2.4.2.5 Referencing XML Elements To refer to a nested XML element, start with the
root-level element, and use an exclamation point (!) between element levels. For
example:
chapter!section
To refer to the attribute of any element, use a colon (:) after the tag name. For example:
chapter!section:title
If you reference an element in the data section, the element value can be merged
back into the data section upon form submission only if one of the following
statements are true:
The root element has already been referenced in the data area.
The root element is referenced in an ExtraRootNodes form element.
A prefix part of the tag is referenced as a ResultSet in the resultsets form
element.
Default values can be specified by applying the :default suffix to a tag path.
Note that default elements might contain Idoc Script for further evaluation.
Example 4–9 shows the format for specifying a default dDocTitle value.
Note: Nested XML elements are not allowed in Content Publisher.
Altering the Appearance and Navigation of Web Pages
4-14 Oracle WebCenter Content Developer's Guide for Content Server
Example 4–9 Specification of a Default Metadata Value
<input type=hidden name="dDocTitle:default" value="<$'MyTitle ' &
dateCurrent()$>">0
4.2.4.2.6 Form Elements The ExtraRootNodes form element enables you to add tags
by creating an Idoc Script variable and then appending the tag names to it, rather
than specifying the tags in the data section of the form. At the end of your form,
you can substitute a string value in place of the ExtraRootNodes value to be
merged back into the data section.
The resultsets form element enables you to add a tag as a ResultSet, rather than
specifying the ResultSet in the data section.
Both the ExtraRootNodes and resultset form elements take a comma-delimited list
of tags.
Example 4–10 shows form elements that add the mychapters!chapter element as a
valid ResultSet if it is not already defined in the idcformrules resultsets
attribute. They also add the root element mychapters, if necessary.
Example 4–10 Form Elements That Add Elements to a ResultSet
<input type=hidden name="resultsets" value="mychapters!chapter">
<input type=hidden name="ExtraRootNodes" value="mychapters">
4.2.4.2.7 ResultSets You can define a ResultSet using XML elements within the data
section for an HCSF page, as follows:
You must use the resultsets attribute of the idcformrules element to specify
a ResultSet.
The element names must be completely qualified, and the full reference path from
the root node must be used.
The columns in the ResultSet are the element content and the element attributes.
For information about limitations on repeating and nesting XML elements in a
ResultSet, see Example 4–13 and Example 4–15.
Example 4–11 shows XML elements that define two ResultSets, named volume and
chapter.
Example 4–11 XML Elements for Defining ResultSets in the Data Section for an HCSF
Page
<idcformrules resultsets="volume,chapter">
<volume title="First Volume">
Volume content here
</volume>
<chapter title="First Chapter">
Chapter content here
</chapter>
This code evaluates to two ResultSets with two columns each. Example 4–12 shows
these ResultSets.
Altering the Appearance and Navigation of Web Pages
Creating Dynamic Server Pages 4-15
Example 4–12 ResultSets Defined by XML Elements
@ResultSet volume
2
volume
volume:title
Volume content here
First Volume
@end
@ResultSet chapter
2
chapter
chapter:title
Chapter content here
First Chapter
@end
If you are not publishing HCSF pages through Content Publisher, you can use
repeated elements for a ResultSet in the data section. Repeated elements are typically
useful for looping over code to create the ResultSet.
The following rules apply to repeated elements for ResultSets:
Repeated elements are not allowed unless they are part of a ResultSet.
Repeated XML elements are not allowed in Content Publisher.
Example 4–13 shows how the chapter element is repeated for the chapter
ResultSet.
Example 4–13 Repeated Elements for a ResultSet
<idcformrules resultsets="chapter">
<chapter title="First Chapter">
Some content here
</chapter>
<chapter title="Second Chapter">
More content here
</chapter>
This code evaluates to a ResultSet with two columns and two rows. Example 4–14
shows this ResultSet.
Example 4–14 ResultSet Created with Repeated Elements
@ResultSet chapter
2
chapter
chapter:title
Some content here
First Chapter
More content here
Second Chapter
@end
A ResultSet can have nested elements, but the nested elements cannot be repeated
within a parent element, as Example 4–15 shows. In this example code, an additional
<section> element would not be allowed within the first <chapter> element.
Altering the Appearance and Navigation of Web Pages
4-16 Oracle WebCenter Content Developer's Guide for Content Server
Example 4–15 Repeated Nested Elements for a ResultSet
<idcformrules resultsets="chapter">
<chapter title="First Chapter">
Some content here
<section title="First Section of First Chapter">
Section content
</section>
</chapter>
<chapter title="Second Chapter">
More content here
</chapter>
This code evaluates into a ResultSet that has four columns and four rows, with the last
two cells blank, as Example 4–16 shows.
Example 4–16 ResultSet Created with Repeated Nested Elements
@ResultSet chapter
4
chapter
chapter:title
chapter!section
chapter!section:title
Some content here
First Chapter
Section Content
First Section of First Chapter
More content here
Second Chapter
@end
The following guidelines apply to editing ResultSets:
Updating a specific row in a ResultSet requires that you indicate the ResultSet row
number in the request parameter. The pound sign character (#) is used by Content
Server to indicate a specific row. If you do not specify a row with the # character,
then a row is appended. If you specify a row # that does not yet exist, then enough
empty rows are added to provide a row to be edited.
Example 4–17 shows how to update the first row (row 0) of a ResultSet.
Example 4–17 Editing a Row in a ResultSet
<input type="text" name="comment#0"
value="new comment">
<input type="text" name="comment!title#0"
value="new title"
Use the exclamation point character (!) to insert new fields into a ResultSet.
For example, to insert author and title fields into the comment ResultSet, you
could name the input fields comment!author and comment!title. If those
fields are not already in the ResultSet, they would be added when the form is
submitted.
To delete a row from a ResultSet, empty all the field values so that they are blank,
as Example 4–18 shows.
Altering the Appearance and Navigation of Web Pages
Creating Dynamic Server Pages 4-17
Example 4–18 Deleting the First Row from a ResultSet
<input type="hidden" name="comment#0" value="">
<input type="hidden" name="comment!title#0" value="">
<input type="hidden" name="comment!date#0" value="">
<input type="hidden" name="comment!author#0" value="">
Another method for deleting rows from a ResultSet is to set the DeleteRows form
element to a list of comma-delimited pairs of ResultSet names and row numbers.
For example, to delete row 2 from the comment ResultSet and row 5 from the
book ResultSet, the DeleteRows form element would be set to the following
comma-delimited pairs:
comment:2,book:5
4.2.4.3 Form Section
The form section contains the code for presentation of the HTML form elements and
any other functionality that the page requires. The form properties, form fields, and
form buttons are placed in an HTML table to control the formatting of the assembled
web page.
For code examples, see Section 4.6.1, "Common Code for Forms."
4.2.4.3.1 Form Begin The form section begins two lines of Idoc Script, as Example 4–19
shows.
Example 4–19 Idoc Script to Begin Form Section
<!--$formName="HTMLForm"-->
<!--$include std_html_form_submit_start-->
The std_html_form_submit_start include in the std_page.idoc resource file
contains code to create a standard HTML form using a POST method, set the
IdcService to SUBMIT_HTML_FORM, and set the dID variable to the value of the
current HCSF page. Example 4–20 shows this code.
Example 4–20 Standard HTML Form for an HCSF Page
<form name="<$formName$>" method="POST"action="<$HttpCgiPath$>">7
<input type=hidden name="IdcService"value="SUBMIT_HTML_FORM">
<input type=hidden name="dID" value="<$SourceID$>">
4.2.4.3.2 Form Properties The form table typically begins with property definitions that
create the fields as form fields, allow the fields to be edited, and set the size of the field
caption area. Example 4–21 shows these property definitions.
Example 4–21 Field Property Definitions for a Form Table
<!--$isFormSubmit=1,isEditMode=1-->
<!--$captionFieldWidth=200, captionEntryWidth=80-->
4.2.4.3.3 Form Fields A few lines of code are typically used to create each input field,
as Example 4–22 shows.
Example 4–22 Code to Create an Input Field on a Form
<!--$eval("<$product_name:maxLength=250$>")-->
<!--$fieldName="model", fieldCaption="Model Number"-->
<!--$include std_display_field-->
Altering the Appearance and Navigation of Web Pages
4-18 Oracle WebCenter Content Developer's Guide for Content Server
DataScript: If you add a form field called DataScript to a form being submitted,
then any Idoc Script for that value is evaluated by Content Server when it
processes the form.
There are two tables (coming from the data island inside the HCSP form) with an
entry in one table that references entries in the other table. Your goal is to change a
value in a specific column and row in the second table when you update a row in
the first table. To accomplish this value change, you can write JavaScript to set the
DataScript value with Idoc Script, as Example 4–23 shows.
Example 4–23 Changing a Field Value in a Table When You Update a Row in Another
Table
modifyRowAndColumn(row, column, value)
{
document.myform.DataScript = "<$setValue('#local', 'table2!'"+ column + "#'"+ row
+
"','" + value + "')$>";
}
Then, when you call the function with column = "myColumn" and row="1" and
value = "Test" while submitting the update form, the resulting DataScript
value before submit would be as follows:
DataScript.value = <$setValue('#local', 'table2!myColumn#1', 'Test')$>
The result would be the column table2!myColumn in row 1 of the table table2
would be updated with the value Test after the form was submitted.
Another way of saying this is that the DataScript can allow arbitrary edits of other
entries in the data island without having to actually create HTML form fields that
reference their names.
4.2.4.3.4 Form Buttons Two lines of code are typically used to create the form
submission and reset buttons. Example 4–24 shows these lines.
Example 4–24 Code for Creating Form Submission and Reset Buttons
<input type=submit name=Submit value=" Submit ">
<input type=reset name=Reset value="Reset">
4.2.4.3.5 Form End After all the form elements and default values have been defined,
the form must end with a </form> tag.
Note: Some fields might require additional code for proper display.
For example, you might need to override the standard std_memo_
entry include to increase the size of text areas. You can do this by
defining a custom include in the IDOC file, as follows:
<@dynamicalhtml std_memo_entry@>
<textarea name="<$fieldName$>" rows=15 cols=50
wrap=virtual><$fieldValue$></textarea>
<@end@>
Creating an HCST Page
Creating Dynamic Server Pages 4-19
4.3 Creating an IDOC File with Custom Includes for Dynamic Server
Pages
Dynamic server pages can work together to modify Content Server behavior. Before
you can create a dynamic server page, you need an IDOC file with custom includes for
the page to reference.
To create an IDOC file with custom includes for dynamic server pages:
1. Create an IDOC file with a custom include, in the format that Example 4–25
shows.
Example 4–25 Custom Include
<@dynamichtml HelloWorld@>
<H1>Hello World/<H1>
<@end@>
In the example, the first include is named HelloWorld, and the second include
defines one line of HTML code.
2. Save the file with the .idoc extension; for example, helloworld.idoc.
3. Check in the IDOC file to Content Server with a Content ID that you can reference
from another file, such as helloworld.
The IDOC file is available to any HCS* pages that reference it.
4.4 Creating an HCST Page
You can create an HCST dynamic server page by referencing an IDOC file in an HCST
file.
To create an HCST page:
1. Create an HCST file that references an include in an IDOC file, like the HCST file
that Example 4–26 shows.
Example 4–26 HCST File Referencing Custom Include
<HTML>
<HEAD>
<$docLoadResourceIncludes("dDocName=helloworld&RevisionSelectionMethod=LatestReleased")$>
</HEAD>
<BODY>
You should see it:
<$include HelloWorld$>
</BODY>
</HTML>
In the example, the line after the <HEAD> tag loads the helloworld.idoc file so
that the includes in the IDOC file are available to this HCST page. The second line
after the <BODY> tag displays the code from the HelloWorld include from the
helloworld.idoc file. Note the use of the standard Idoc Script tags, <$...$>.
2. Save the file with a .hcst extension; for example, helloworld.hcst.
3. Check in the HCST file to Content Server.
Creating an HCSP Page
4-20 Oracle WebCenter Content Developer's Guide for Content Server
4.5 Creating an HCSP Page
You can create an HCSP dynamic server page by referencing an IDOC file in an HCSP
file.
To create an HCSP Page
1. Create an HCSP file that references an include in an IDOC file, like the HCSP file
that Example 4–27 shows.
Example 4–27 HCSP File Referencing Custom Include
<HTML>
<HEAD>
<!--$docLoadResourceIncludes("dDocName=helloworld&amp;RevisionSelectionMethod=LatestReleased")-->
</HEAD>
<BODY>
You should see it:
<!--$include HelloWorld-->
</BODY>
</HTML>
In the example, the line after the <HEAD> tag loads the helloworld.idoc file so
that the includes in the IDOC file are available to this HCSP page. The second line
after the <BODY> tag displays the code from the HelloWorld include from the
helloworld.idoc file. Note the use of the HTML comment tags, <!--...-->.
2. Save the file with a .hcsp extension; for example, helloworld.hcsp.
3. Check in the HCSP file to Content Server.
4.6 Creating an HCSF Page
A typical HCSF page and its associated IDOC file are shown in Example 4–28. This
example creates a form that users can fill out and submit to enter product descriptions
as content items.
To create an HCSF page:
1. Create an HCSF file that references an IDOC file named form_std_page, as
Example 4–28 shows.
Example 4–28 Product Description Form in HCSF File
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<!--$docLoadResourceIncludes("dDocName=form_std_page&amp;
RevisionSelectionMethod=Latest")-->
<head>
<meta NAME="idctype’ CONTENT="form; version=1.0">
<!--$include form_head_section-->
</head>
<!--$include form_pre_xml_section-->
Creating an HCSF Page
Creating Dynamic Server Pages 4-21
<!--$idcbegindata-->
<idcformrules isFormFinished="0"/>
<product_name content="html">
</product_name?
<model_number content="html">
SC-
</model_number>
<summary_description>
Enter a summary here.
</summary_description>
<full_description>
Enter a full description here.
</full_description>
<author>
<division>
Household Products
</division>
<revision>
</revision>
<!--$idcenddata-->
<!--$include form_post_xml_section-->
</body>
</html>
In the example, the line after the html tag loads the IDOC file with the Content ID
of form_std_page so that the includes in the IDOC file are available to this
HCSF page.
The meta tag is required for Content Publisher to acknowledge that this is a
Content Server HTML form.
The two includes after the meta tag, defined in the form_std_page IDOC file,
generate the code at the beginning of the web page.
The isFormFinished attribute of the idcformrules tag tells Content Server
that the form is not finished, so the fields can be edited, and the form can be
submitted.
The content property does not have to be set for each tag; it defaults to html.
The idcbegindata and idcenddata tags define the XML tagged area, which
specifies rules and initial metadata values for the form.
The text in each set of XML tags will populate the corresponding field on the form.
The last include in the example, defined in the form_std_page IDOC file,
generates the code at the end of the web page.
2. Save the file as product_form.hcsf.
3. Check in the HCSF file to Content Server.
4. Create an IDOC file with custom includes, as Example 4–29 shows.
Creating an HCSF Page
4-22 Oracle WebCenter Content Developer's Guide for Content Server
Example 4–29 IDOC File with Custom Includes
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<body>
<@dynamichtml form_head_section@>
<!--standard includes for a standard hcsp page-->
<$defaultPageTitle="Product Description Form"$>
$include std_html_head_declarations$>
<@end@>
<@dynamichtml form_pre_xml_section@>
<!--This code is here for static viewing.-->
<$if 0$>
<body>
<$endif$>
<$include body_def$>
<@end@>
<@dynamichtml form_post_xml_section@>
<$include std_page_begin$>
<$include std_header$>
<$formName="HTMLForm"$>
<$include std_html_form_submit_start$>
<table>
<$if strEquals(ref:dExtension,"hcsf"))$>
<$isHcsf=1$>
<$else$>
<$isHcsp=1$>
<$endif$>
<$if isHcsf$>
<$isFormSubmit=1,isEditMode=1$>
<$endif$>
<$captionFieldWidth=150, captionEntryWidth=200$>
<$eval("<$product_name:maxLength=250$>")$>
<$fieldName="product_name", fieldCaption="Product Name"$>
<$if isHcsp$><isInfoOnly=1$><$endif$>
<$include std_display_field$>
<$eval("<$model_number:maxLngth=250$>")$>
<$fieldName="model_number", fieldCaption="Model Number"$>
<$if isHcsp$><$isInfoOnly=1$><$endif$>
<$include std_display_field$>
<$fieldName="summary_description",
fieldCaption="Summary Description",
fieldType="Memo"$>
<$if isHcsp$><$isInfoOnly=1$><$endif$>
<$include std_display_field$>
Creating an HCSF Page
Creating Dynamic Server Pages 4-23
<fieldName="full_descripton",
fieldCaption="Full Description",
fieldType="Memo"$>
<$if isHcsp$><$isInfoOnly=1$><$endif$>
<$include std_display_field$>
<$eval("<$author:maxLength=250$>")$>
<$fieldName="author", fieldCaption="Author"$>
<$if isHcsp$><$isInfoOnly=1$><$endif$>
<$include std_display_field$>
<$eval("<$division:maxLength=250$>")$>
<$fieldName="division", fieldCaption="Division"$>
<$if isHcsp$><$isInfoOnly=1$><$endif$>
<$include std_display_field$>
<$eval("<$revision:maxLength=250$>")$>
<$fieldName="revision", fieldCaption="Revision"$>
<$if isHcsp$><$isInfoOnly=1$><$endif$>
<$include std_display_field$>
<tr>
<td colspand=2><hr></td>
</tr>
<tr>align=center>
<td colspan=2>
<$if isHcsf$>
<input type=submit name=Submit value=" Submit ">
<input type=reset name=Reset Value="Reset">
<$endif$>
<input type=hidden name="dDocTitle:default"
value="<$"Product Description " & dateCurrent()$>">
</td>
</tr>
</table>
</form>
<$include std_page_end$>
<@end@>
</body>
</html>
In the example, the form_head_section include defines the page title and the
code for the standard HTML head section (referencing the std_html_head_
declarations include in the std_page.htm resource file).
The form_pre_xml_section include allows the page to be viewed statically
and defines code for a standard Content Server web page (referencing the body_
def include in the std_page.htm resource file).
The form_post_xml_section include defines the form fields. The std_page_
begin and std_header includes, which are defined in the std_page.htm
resource file, define code for a standard Content Server web page. The two lines
after these includes define the form name and the code for a standard HTML form
(referencing the std_htm_form_submit_start include in the std_page.htm
file).
Creating an HCSF Page
4-24 Oracle WebCenter Content Developer's Guide for Content Server
The conditional after the table tag determines if this is an editable form or a page
that has already been submitted, based on the file name extension. If this is an
editable page (isHcsf=1), the next conditional sets variables that create the fields
as form fields and allow the fields to be edited. The line after the conditionals sets
the width of the table cells for field captions to 150 pixels and sets the width of the
table cells for input fields to 200 pixels.
The eval function sets the maximum length of a text field to 250 characters.
The fieldName tag defines the name, caption, and type of field. If fieldType is
not defined, it defaults to Text.
If this is a form that has already been submitted (isHcsp=1), the if isHcsp
conditional sets a variable that makes the form field read-only.
The std_display_field include, defined in the std_page.htm resource file,
defines code that creates the form field.
If this is an editable form (isHcsf=1), the if isHcsf conditional creates the
Submit and Reset buttons.
The line after the if isHcsf conditional generates the document title
(dDocTitle) automatically.
The std_page_end include, defined in the std_page.htm resource file,
generates the code at the end of the web page.
5. Save the file as form_std_page.idoc.
6. Check in the IDOC file to Content Server with a Content ID of form_std_page.
(This is the name that is referenced by the HCSF page.)
7. Search for the HCSF content item in Content Server.
8. Click the link to display the form to create an HCSF page in your web browser.
The form should look like the sample in Figure 4–2.
Figure 4–2 Form to Create HCSF Page Displayed in a Web Browser
9. Fill out the form with some sample values, and click Submit.
A content item is created as an HCSP page.
Creating an HCSF Page
Creating Dynamic Server Pages 4-25
10. Search for the HCSP page in Content Server.
11. Click the link to display the HCSP page in your web browser. Figure 4–3 shows
how the page should look.
Figure 4–3 HCSP Page
4.6.1 Common Code for Forms
The following features are commonly used in HCSF pages and associated IDOC files.
Retrieving file information
Referencing a file extension
Defining form information
Defining form fields
Defining hidden fields
Submitting a form
4.6.1.1 Retrieving File Information
Executing the service DOC_INFO_SIMPLE makes metadata from a specific file
available to the page. Example 4–30 shows the Idoc Script to execute this service.
Example 4–30 Idoc Script to Retrieve Metadata
<$dID=SourceID$>
<$executeService("DOC_INFO_SIMPLE")$>
4.6.1.2 Referencing a File Extension
You can reference a file extension in an if statement for a form to determine whether
the form has been submitted (.hcsp file) or unsubmitted (.hcsf file), as
Example 4–31 shows.
Example 4–31 Statement to Reference a File Extension
<$if (strEquals(ref:dExtension,"hcsf"))$>
<$isHcsf=1$>
<$else$>
<$isHcsp=1$>
<$endif$>
For information about the ref: prefix, see Section 4.2.1.4, "Referencing Metadata."
Creating an HCSF Page
4-26 Oracle WebCenter Content Developer's Guide for Content Server
4.6.1.3 Defining Form Information
Two lines of code define the form name and the standard include to start an HTML
form, as Example 4–32 shows.
Example 4–32 Name and Standard Include for an HTML Form
<$formName="HTMLForm"$>
<$include std_html_form_submit_start$>
Example 4–33 shows typical code to define form properties.
Example 4–33 Form Properties
<table border=0 width=100%>
<$isEditMode=1,isFormSubmit=1$>
<$captionFieldWidth="25%", captionEntryWidth="75%"$>
4.6.1.4 Defining Form Fields
Use standard Idoc Script variables and the std_display_field include to display the
form fields, as Example 4–34 shows.
Example 4–34 Standard Idoc Script to Display Form Fields
<$fieldName="news_
author",fieldDefault=dUser,fieldCaption="Author",isRequired=1,requiredMsg =
"Please specify the author."$>
<$include std_display_field$>
Some fields might require extra code to display the field correctly. For instance, the
standard text area for a memo field is 3 rows by 40 columns, but you might need to
override the standard include to increase the size of the text area. Example 4–35 shows
the standard std_memo_entry include.
Example 4–35 Standard Include for a Memo Field
<@dynamichtml std_memo_entry@>
<textarea name="<$fieldName$>" rows=3 cols=40 wrap=virtual> <$fieldValue$></textarea>
<@end@>
Example 4–36 shows how to use a custom std_memo_entry include to increase the
text area to a specified size, in this case 15 rows by 50 columns.
Example 4–36 Custom Include for a Memo Field
<@dynamichtml std_memo_entry@>
<textarea name=<$fieldName$> rows=15 cols=50 wrap=virtual><$fieldValue$></textarea>
<@end@>
4.6.1.5 Defining Hidden Fields
You can specify metadata for a submitted form (HCSP) by defining a hidden field,
which contributors cannot change. For example, the following code assigns the
document type News_Forms to each submitted form:
<input type=hidden name="dDocType" value="News_Forms">
This code specifies the security group of the submitted forms:
<input type=hidden name="dSecurityGroup" value="Public">
Verifying the Display of an HCST, HCSP, or HCSF Page in a Web Browser
Creating Dynamic Server Pages 4-27
4.6.1.6 Submitting a Form
When a form is submitted, you may want to call a Java function to perform additional
validation or processing. For example:
<input type=button name=Submit value="Save" onClick="postCheckIn(this.form)">
4.7 Verifying the Display of an HCST, HCSP, or HCSF Page in a Web
Browser
After you save an HCST, HCSP, or HCSF file, you can verify the page display in a Web
Browser, as Example 4–37 shows.
Example 4–37 Displaying an HCST Page and HCSP Page
1. Search for the helloworld content items in Content Server.
2. Display the HCST file and HCSP files in your web browser. They should both look
like the example in Figure 4–4.
Figure 4–4 HelloWorld Content Item Displayed in a Web Browser
Verifying the Display of an HCST, HCSP, or HCSF Page in a Web Browser
4-28 Oracle WebCenter Content Developer's Guide for Content Server
Part III
Part III Modifying the Functionality of Content
Server
This part describes how to change the basic functionality of Oracle WebCenter Content
Server.
Part III contains the following chapters:
Chapter 5, "Changing System Settings"
Chapter 6, "Changing Configuration Information"
Chapter 7, "Customizing Services"
Chapter 8, "Generating Actions Menus"
5
Changing System Settings 5-1
5Changing System Settings
This chapter describes how to change the basic functionality of Oracle WebCenter
Content Server.
This chapter includes the following sections:
Section 5.1, "About Changing System Settings"
Section 5.2, "Changing System Settings Through the Admin Server"
Section 5.3, "Changing System Settings Through the System Properties
Application"
Section 5.4, "Customizing the Library and System Home Page with the Web
Layout Editor"
Section 5.5, "Defining Security and Accounts for Users with the User Admin
Application"
The instructions in this chapter are for changing system settings on Oracle WebLogic
Server. Oracle WebCenter Content can also be deployed to an IBM WebSphere
Application Server. For more information, see the Oracle Fusion Middleware Third-Party
Application Server Guide.
5.1 About Changing System Settings
Oracle WebCenter Content Server has a number of features that you can set up to
change features systemwide according to your needs. For example, you can use the
following administration tools within Oracle WebCenter Content Server to customize
your content management system settings:
Admin Server
System Properties utility