+ All Categories
Home > Documents > webcenter_sites_11gr1_developer_guide.pdf

webcenter_sites_11gr1_developer_guide.pdf

Date post: 11-Apr-2015
Category:
Upload: onidojo
View: 119 times
Download: 4 times
Share this document with a friend
902
Oracle® WebCenter Sites Developer’s Guide 11g Release 1 (11.1.1) April 2012
Transcript

Oracle WebCenter SitesDevelopers Guide 11g Release 1 (11.1.1)

April 2012

Oracle WebCenter Sites Developers Guide, 11g Release 1 (11.1.1) Copyright 2012 Oracle and/or its affiliates. All rights reserved. Primary Author: Will Harris Contributing Author: Promila Chitkara, Tatiana Kolubayev, Melinda Rubenau Contributor: Kannan Appachi, Patrice Palau, Vijayalakshmi Rajan, Joseph Granato, Avadhani Chandrashekar, Saikat Chaudhuri, Ravi Khanuja 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.

3

Table of

ContentsAbout This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 1 Introducing Oracle WebCenter Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 From the Content Entry Form to the Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Developing a Dynamic Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 WebCenter Sites Data Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Presentation Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Element Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 APIs and JSP Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Sessions and Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 WebCenter Sites Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Website Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 WebCenter Sites Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Approval and Publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Performance: Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Page Caching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Resultset Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Asset Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Satellite Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 WebCenter Sites Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Sample Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Part 1. Overview2 Overview of Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Content Management Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Online Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Developers and the Content Management Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Sites and the Site Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Oracle WebCenter Sites Developers Guide

Table of Contents

4

Sites and the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3 Oracle WebCenter Sites Development Process . . . . . . . . . . . . . . . . . . . . . . 51 Step 1: Set Up the Team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Step 2: Create Functional and Design Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Page Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Caching Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Security Strategy (Access Control). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Separate Format from Content (Elements from Assets) . . . . . . . . . . . . . . . . . . . . . . . 53 Data Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Step 3: Set Management System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Step 4: Implement the Data Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Step 5: Build the Online Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Step 6: Set Up the Management System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Import Content as Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Import Catalog Data and Flex Asset Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Instruct the Editorial Team About Site Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Step 7: Set Up the Delivery System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Step 8: Publish to the Delivery System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Part 2. Programming Basics4 Programming with Oracle WebCenter Sites . . . . . . . . . . . . . . . . . . . . . . . . . 63 Choosing a Coding Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 The Oracle WebCenter Sites Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 The ICS Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 The FTCS tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 WebCenter Sites JSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 WebCenter Sites Standard Beginning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 JSP Implicit Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Scriptlets and Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 JSP Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Oracle WebCenter Sites Tag Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 WebCenter Sites XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 WebCenter Sites Standard Beginning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 XML Entities and Reserved Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 XML Parsing Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 WebCenter Sites Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Tags That Create the WebCenter Sites Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Tags That Handle Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Oracle WebCenter Sites Developers Guide

Table of Contents

5

Tags That Call Pages and Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Tags That Create URLs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Tags That Control Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Tags That Set Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Programming Construct Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Tags That Manage Compositional and Approval Dependencies . . . . . . . . . . . . . . . . 79 Tags That Retrieve Information About Basic Assets . . . . . . . . . . . . . . . . . . . . . . . . . 80 Tags That Create Assetsets (Flex Assets) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Tags That Create Searchstates (Flex Assets) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Reserved Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Setting Regular Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Setting Session Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Working With Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Variables and Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Best Practices with Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Other WebCenter Sites Storage Constructs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Built-ins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Values for Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5 Page Design and Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Modular Page Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 WebCenter Sites Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 BlobServer and Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Satellite Server Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Viewing the Contents of the Satellite Server Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 CacheManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 The SiteCatalog Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 The Cache Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Caching Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Double-Buffered Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Implementing Double-Buffered Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Setting cscacheinfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Coding for Caching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Caching and Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Intelligent Cache Management with WebCenter Sites . . . . . . . . . . . . . . . . 117 WebCenter Sitess Rendering Engine Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 CacheManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Enabling CacheManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Tier 1 Cache Configuration Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Tier 2 Cache Configuration Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

6

Oracle WebCenter Sites Developers Guide

Table of Contents

6

7

Advanced Page Caching Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Configuring the WebCenter Sites Cache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Configuring the Blob Server Cache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Configuring the Satellite Server Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 CacheInfo String Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 CacheInfo String: First Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 CacheInfo String: Second Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Page Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Absolute Moment in Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 TimePattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Wildcard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Blank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 WebCenter Sites Tools and Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Oracle WebCenter Sites Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Connecting to a WebCenter Sites Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 CatalogMover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Starting CatalogMover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Connecting to WebCenter Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 CatalogMover Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Exporting Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Importing Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 Property Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Starting the Property Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Setting Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Merging Property Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 XMLPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Sessions and Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 What Is a Session? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Session Lifetime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Session Variables Maintained by WebCenter Sites . . . . . . . . . . . . . . . . . . . . . . . . . 146 Logging In and Logging Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Sessions Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 FeelingsForm Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 SetFeeling Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Meat Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 What Is a Cookie? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 CookieServer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Cookie Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Cookie Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Start.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 ColorForm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

8

9

Oracle WebCenter Sites Developers Guide

Table of Contents

7

CreateCookie. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 DisplayWelcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Running the Cookie Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Satellite Server Session Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Flushing Session Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 10 Error Logging and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Logging to the WebCenter Sites Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Using Error Codes with Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Tag Examples Using Error Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Error Number Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

Part 3. Data Design11 Data Design: The Asset Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Asset Types and Asset Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Two Data Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Default Core Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Which Asset Model Should You Use to Represent Your Content? . . . . . . . . . . . . . 164 The Basic Asset Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Basic Asset Types from the Burlington Financial Sample Site . . . . . . . . . . . . . . . . 166 Relationships Between Basic Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Category, Source, and Subtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Basic Asset Types and the Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 The Flex Asset Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 The Flex Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Sample Site Flex Families. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Flex Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Flex Parents and Flex Parent Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Flex Assets and Flex Definition Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Flex Families and the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Assetsets and Searchstates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 Search Engines and the Two Asset Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Tags and the Two Asset Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Summary: Basic and Flex Asset Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Where the Asset Models Intersect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Where the Asset Models Differ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Summary: Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 12 The WebCenter Sites Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Types of Database Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Object Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

Oracle WebCenter Sites Developers Guide

Table of Contents

8

Tree Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Content Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Foreign Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Identifying a Tables Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 Types of Columns (Fields) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Generic Field Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Database-Specific Field Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Indirect Data Storage with the WebCenter Sites URL Field . . . . . . . . . . . . . . . . . . 199 Creating Database Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 Creating Object Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 Creating Tree Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 Creating Content Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 Registering a Foreign Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 How Information Is Added to the System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Property Files and Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 13 Managing Data in Non-Asset Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 Methods and Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 Writing and Retrieving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 Querying for Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 Lists and Listing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 Coding Data Entry Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Adding a Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 Deleting a Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 Querying a Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Querying a Table with an Embedded SQL Statement . . . . . . . . . . . . . . . . . . . . . . . 229 Managing the Data Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Deleting Non-Asset Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 14 Resultset Caching and Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Caching Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Database Queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 How Resultset Caching Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Reducing the Load on the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Specifying the Table Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 SELECTTO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 EXECSQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 CALLSQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Search Forms in the WebCenter Sites Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 Query Asset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 SEARCHSTATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Flushing the Resultset Cache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Switching Between Caching Frameworks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

Oracle WebCenter Sites Developers Guide

Table of Contents

9

Configuring Resultset Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Planning Your Resultset Caching Strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Default Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Table-Specific Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 15 Designing Basic Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 The AssetMaker Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 How AssetMaker Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 Asset Descriptor Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Columns in the Asset Types Database Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Elements and SQL Statements for the Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . 254 Creating Basic Asset Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Step 1: Code the Asset Descriptor File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Step 2: Upload the Asset Descriptor File to WebCenter Sites . . . . . . . . . . . . . . . . . 267 Step 3: Create the Asset Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Step 4: Configure the Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 Step 5: Enable the Asset Type on Your Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Step 6: Fine-Tune the Asset Descriptor File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Step 7: (Optional) Customize the Asset Type Elements. . . . . . . . . . . . . . . . . . . . . . 272 Step 8: (Optional) Configure Subtypes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Step 9: (Optional) Configure Association Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Step 10: (Optional) Configure Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Step 11: (Optional) Configure Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Step 12: (Conditional) Add Mimetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Step 13: (Optional) Edit Search Elements to Enable Indexed Search . . . . . . . . . . . 282 Step 14: Create and Assign Asset Type Icons (Contributor Interface Only) . . . . . . 283 Step 15: Code Templates for the Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Step 16: Move the Asset Types to Other Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Deleting Basic Asset Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 16 Designing Flex Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 Design Tips for Flex Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Visitors on the Delivery System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Users on the Management System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 How Many Attribute Types Should You Create?. . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Designing Flex Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 How Many Definition Types Should You Create?. . . . . . . . . . . . . . . . . . . . . . . . . . 289 Designing Parent Definition and Flex Definition Assets . . . . . . . . . . . . . . . . . . . . . 289 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 The Flex Family Maker Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 The Flex Asset Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Creating a Flex Asset Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

Oracle WebCenter Sites Developers Guide

Table of Contents

10

Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Step 1: Create a Flex Family. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Step 2: (Optional) Create Additional Flex Family Members . . . . . . . . . . . . . . . . . . 296 Step 3: Enable the New Flex Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Step 4: Create Flex Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Step 5: (Optional) Create Flex Filter Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 Step 6: Create Parent Definition Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 Step 7: Create Flex Definition Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 Step 8: Create Flex Parent Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Step 9: Create and Assign Asset Type Icons (Contributor Interface Only) . . . . . . . 308 Step 10: Code Templates for the Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 Step 11: Test Your Design (Create Test Flex Assets) . . . . . . . . . . . . . . . . . . . . . . . 309 Step 12 (Optional): Create Flex Asset Associations. . . . . . . . . . . . . . . . . . . . . . . . . 309 Step 13: Move the Asset Types to Other Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Editing Flex Attributes, Parents, and Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Editing Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Editing Parent Definitions and Flex Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Editing Parents and Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Using Product Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 What Is a Product Set? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 Creating Product Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 17 Flex Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Flex Filter Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Flex Filter Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Defining a Flex Filter Class and Creating a Flex Filter Asset. . . . . . . . . . . . . . . . . . . . . 319 Implementing a Flex Filter Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 Defining a Custom Flex Filter Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 Creating Flex Filter Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Document Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Default Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Custom Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Customizing Document Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 18 Designing Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 The presentationobject.dtd File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 The Attribute Editor Asset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 The Attribute Editor Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 Conventions for the Attribute Editor Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Creating Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 Customizing Attribute Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

Oracle WebCenter Sites Developers Guide

Table of Contents

11

Example: Customized Attribute Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 Editing Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 19 Configuring Bundled Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 Configuring CKEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Creating a CKEditor Instance and Enabling It for a Field . . . . . . . . . . . . . . . . . . . . 358 Enabling CKEditor for Use in Web Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 Enabling Selected Asset Types for the CKEditor. . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Setting the Approval Dependency for Included Assets . . . . . . . . . . . . . . . . . . . . . . 363 Enable Image Picker for the CKEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Customizing the CKEditor Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 Configuring Spell Check Support in CKEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 Configuring the Clarkii Online Image Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 Creating a Clarkii OIE Instance and Enabling it for a Field. . . . . . . . . . . . . . . . . . . 369 Configuring Clarkii OIE Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 Implementing a Field Copier Filter to Classify Assets . . . . . . . . . . . . . . . . . . . . . . . 375 Configuring the Image Picker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 Categorizing Image Assets for Display in Image Picker . . . . . . . . . . . . . . . . . . . . . 379 Sample Image Picker Attribute Editor Definition Code . . . . . . . . . . . . . . . . . . . . . . 379 20 Importing Assets of Any Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 The XMLPost Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 XMLPost Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 Configuration Properties for XMLPost. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 Configuration Properties for the Posting Element . . . . . . . . . . . . . . . . . . . . . . . . . . 386 Configuration Properties for the Source Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 Sample XMLPost Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 XMLPost Source Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 Sample XMLPost Source File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 XMLPost and File Encoding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 Using the XMLPost Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 Running XMLPost from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 Running XMLPost as a Batch Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 Running XMLPost Programmatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Customizing RemoteContentPost and PreUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Setting a Field Value Programmatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 Setting an Asset Association. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 Troubleshooting XMLPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 Debugging the Posting Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 21 Importing Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404

Oracle WebCenter Sites Developers Guide

Table of Contents

12

Importing the Data Structure Flex Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 Importing the Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 Importing Flex Assets: The Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 Using Custom Data Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 XMLPost and the Flex Asset Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Internal Names vs. External Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Importing the Structural Asset Types in the Flex Model . . . . . . . . . . . . . . . . . . . . . . . . 408 Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 Flex Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410 Flex Definitions and Flex Parent Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 Flex Parents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 Importing Flex Assets with XMLPost. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 Configuration File Properties and Source File Tags for Flex Assets . . . . . . . . . . . . 419 Sample Flex Asset Configuration File for addData . . . . . . . . . . . . . . . . . . . . . . . . . 422 Sample Flex Asset Source File for addData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 Sample Flex Asset Configuration File for RemoteContentPost . . . . . . . . . . . . . . . . 427 Sample Flex Asset Source File for RemoteContentPost. . . . . . . . . . . . . . . . . . . . . . 428 Editing Flex Assets with XMLPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 Configuration Files for Editing Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 Source Files for Editing Flex Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 Deleting Assets with XMLPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 Configuration Files for Deleting Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 Source Files for Deleting Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 22 Importing Flex Assets with the BulkLoader Utility . . . . . . . . . . . . . . . . . . . 433 Overview of BulkLoader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 BulkLoader Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 How BulkLoader Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 Using the BulkLoader Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 Importing Flex Assets from Flat Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 Step 1: Use XMLPost to Import Structural Assets . . . . . . . . . . . . . . . . . . . . . . . . . . 437 Step 2: Create the Input Table (Data Source) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 Step 3: Create the Mapping Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 Step 4: Create the BulkLoader Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . 440 Step 5: Run the BulkLoader Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 Step 6: Review Feedback Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 Step 7: Approve and Publish the Assets to the Delivery System . . . . . . . . . . . . . . . 448 Importing Flex Assets Using a Custom Extraction Mechanism . . . . . . . . . . . . . . . . . . . 448 IDataExtract Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 IPopulateDataSlice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 IFeedback Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 Approving Flex Assets with the BulkApprover Utility. . . . . . . . . . . . . . . . . . . . . . . . . . 457 Configuring BulkApprover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 Using BulkApprover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

Oracle WebCenter Sites Developers Guide

Table of Contents

13

Part 4. Site Development23 Creating Template, CSElement, and SiteEntry Assets. . . . . . . . . . . . . . . . 463 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Pages, Pagelets, and Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 Elements, Pagelets, and Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 Calling Pages and Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 Page vs. Pagelet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 CSElement, Template, and SiteEntry Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 Template Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 CSElement Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 What About Non-Asset Elements? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Creating Template Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 Procedures for Creating Template Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 Creating CSElement Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 Procedures for Creating CSElement Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 Creating SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 Procedures for Creating SiteEntry Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 Managing Template, CSElement, and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . 512 Designating Default Approval Templates (Static Publishing Only). . . . . . . . . . . . . 512 Editing Template, CSElement, and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . 512 Sharing Template, CSElement, and SiteEntry Assets. . . . . . . . . . . . . . . . . . . . . . . . 513 Deleting Template, CSElement, and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . 513 Previewing Template, CSElement, and SiteEntry Assets. . . . . . . . . . . . . . . . . . . . . 514 Using Oracle WebCenter Sites Explorer to Create and Edit Element Logic . . . . . . . . . 515 Creating Templates and CSElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516 Editing Templates and CSElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516 24 Creating Templates and Wrappers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 Working with Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 Layout Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 Pagelet Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 Page Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 Working with Wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 Creating a Wrapper Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 Wrappers and Previewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 25 Coding Templates for In-Context and Presentation Editing . . . . . . . . . . . 535 Coding Templates for In-Context Content Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 Attribute Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 String Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537

Oracle WebCenter Sites Developers Guide

Table of Contents

14

Text Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 Date Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 Binary Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 Asset Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 Number Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 Multivalued Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 Coding Templates for Presentation Editing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 Selecting a Different Layout for the Entire Web Page . . . . . . . . . . . . . . . . . . . . . . . 556 Selecting a Different Layout for a Page Fragment . . . . . . . . . . . . . . . . . . . . . . . . . . 557 Editing Presentation and Content Simultaneously . . . . . . . . . . . . . . . . . . . . . . . . . . 564 Understanding the Context System Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 Using Slots with CSElement and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . 570 Constraining Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 Preventing CSS and JavaScript Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 Creating Content using the In-Context UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 Defining a Start Menu for In-Context Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 Providing Layout Templates for In-Context Creation . . . . . . . . . . . . . . . . . . . . . . . 574 Providing Empty Value Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 Providing Editing-Specific Presentation Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 26 Creating Collection Assets, Query Assets, and Page Assets . . . . . . . . . . 577 Collection Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 Creating Collection Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578 Sharing Collection Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 Query Assets and Other Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 How the Query Is Stored. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 Commonly Used Fields for Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 Creating Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 Sharing Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 Previewing and Approving Query Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 Page Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 Page Asset Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 Creating a Page Asset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 Placing Page Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 Moving Page Assets in the Site Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 Placing Page Assets and Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 Editing Page Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 Deleting Page Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 27 Best Practices for Creating Future Site Preview Assets and Templates . 595 Considerations when Implementing Future Site Preview . . . . . . . . . . . . . . . . . . . . . . . 596 Creating Sets of Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596

Oracle WebCenter Sites Developers Guide

Table of Contents

15

Writing Templates for Future Site Preview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 The asset:filterassetsbydate tag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 The Input List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 Caching Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 28 Coding Elements for Templates and CSElements . . . . . . . . . . . . . . . . . . . 601 About Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602 The Publishing System and Approval Dependencies . . . . . . . . . . . . . . . . . . . . . . . . 602 Page Generation and Compositional Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . 607 About Coding to Log Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 ASSET.LOAD and asset:load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 The ASSETSET (assetset) Tag Family. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 RENDER.GETPAGEURL and render:getpageurl . . . . . . . . . . . . . . . . . . . . . . . . . . 609 RENDER.LOGDEP (render:logdep) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 RENDER.FILTER and render:filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 RENDER.UNKNOWNDEPS and render:unknowndeps . . . . . . . . . . . . . . . . . . . . . 611 Calling CSElement and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 Coding Elements to Display Basic Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 Assets That Represent Simple Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 Associations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 ImageFile Assets or Other Blob Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 Basic Assets That Can Have Embedded Links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 Page Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 About Coding Elements that Display Flex Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 Assetsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 Searchstates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 Assetsets, Searchstates, and Flex Attribute Asset Types . . . . . . . . . . . . . . . . . . . . . 623 Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 Coding Templates That Display Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 Example Data Set for the Examples in This Section . . . . . . . . . . . . . . . . . . . . . . . . 624 Examples of Assetsets with One Product (Flex Asset). . . . . . . . . . . . . . . . . . . . . . . 626 Special Cases: Flex Attributes of Type Text, Blob, and URL . . . . . . . . . . . . . . . . . 628 Examples of Assetsets with More Than One Product (Flex Asset) . . . . . . . . . . . . . 631 Creating URLs for Hyperlinks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 RENDER.GETPAGEURL (render:getpageurl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636 RENDER.SATELLITEBLOB (render:satelliteblob) . . . . . . . . . . . . . . . . . . . . . . . . 636 RENDER.GETBLOBURL (render:getbloburl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 Using the referURL Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 Handling Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 Using the Errno Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 Ensuring that Incorrect Pages Are Not Cached . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639

Oracle WebCenter Sites Developers Guide

Table of Contents

16

29 Template Element Examples for Basic Assets . . . . . . . . . . . . . . . . . . . . . . 641 Example 1: Basic Modular Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 First Element: Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 Second Element: MainStoryList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 Third Element: LeadSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 Fourth Element: TeaserSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 Back to LeadSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 Back to MainStoryList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 Back to Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646 Example 2: Coding Links to the Article Assets in a Collection Asset . . . . . . . . . . . . . . 646 First element: SectionFront. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 Second element: PlainList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 Example 3: Using the ct Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 First Element: SectionFront . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650 Second Element: TextOnlyLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 ColumnistFront . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 Example 4: Coding Templates for Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 First Element: Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 Second Element: WireFeedBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 Third Element: ExecuteQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 Back to WireFeedBox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 Example 5: Displaying an Article Asset Without a Template. . . . . . . . . . . . . . . . . . . . . 656 First Element: Full . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 Second Element: AltVersionBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 Third Element: EmailFront . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 Example 6: Displaying Site Plan Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658 First Element: Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658 Second Element: SiteBanner. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658 Third Element: TopSiteBar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 Back to SiteBanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 Example 7: Displaying Non-Asset Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 First Element: Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 Second Element: ShowMainDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 30 Configuring Sites for Multilingual Support . . . . . . . . . . . . . . . . . . . . . . . . . 663 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 Dimension Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 Cross-Site Multilingual Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665 Master Assets, Translations, and Multilingual Sets . . . . . . . . . . . . . . . . . . . . . . . . . 666 Translations and Asset Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 Approval Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 Working with Locale Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 Handling Asset Relationships Through Locale Filtering . . . . . . . . . . . . . . . . . . . . . 669 Included Locale Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669

Oracle WebCenter Sites Developers Guide

Table of Contents

17

Custom Locale Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 Compositional Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 Adding Filtering Support to Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 Planning Multilingual Support for a Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 Configuring Multilingual Support for a Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 Configuration Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 Enabling the Dimension and DimensionSet Asset Types . . . . . . . . . . . . . . . . . 677 Enabling the Locale Subtype of the Dimension Asset Type . . . . . . . . . . . . . . . 678 Creating a Locale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678 Sharing a Locale to Another Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 Creating and Configuring a Dimension Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 Sharing a Dimension Set to Another Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680 Configuring a Locale Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681 Configuring the Fallback Hierarchy of the Hierarchical Filter . . . . . . . . . . . . . . . . 682 Bulk-Assigning a Default Locale to Assets in a Site . . . . . . . . . . . . . . . . . . . . . . . . 683 31 User Management on the Delivery System . . . . . . . . . . . . . . . . . . . . . . . . . 687 The Directory Services API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 Directory Services Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 Directory Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 Troubleshooting Directory Services Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 693 Controlling Visitor Access to Your Online Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 ACL Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 User Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 WebCenter Sites and Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 Creating Login Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 Prompt for Login (PromptForLogin.xml). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 Root Element for the Login Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 Creating User Account Creation Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 PromptForNewAccount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 Root Element for the CreateAccount Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 Visitor Access in the Burlington Financial Sample Site . . . . . . . . . . . . . . . . . . . . . . . . . 701 Membership Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 Users and Passwords. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 Member Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 Membership Processing Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 32 The HelloAssetWorld Sample Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 HelloAssetWorld Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 HelloAssetWorld Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705

Oracle WebCenter Sites Developers Guide

Table of Contents

18

Modified Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 The HelloArticle Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 The HelloImage Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 HelloAssetWorld Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 The HelloArticle Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 The HelloCollection Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710 The HelloPage Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713 The HelloQuery Asset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 33 The Burlington Financial Sample Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718 Navigation Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 Breadcrumbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720 Best Practices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 Searching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 Hot Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 Topic Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722 Related Stories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723 Text-Only Versions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724 Plain Text Parallel Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724 E-mail This Story . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725 AssetMaker Asset Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725 Mimetype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725 Collections of Collections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 Membership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 Wire Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 Featured Funds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 Fund Finder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 Page Cache Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728

Part 5. Management System Features34 Customizing the WebCenter Sites Admin Interface . . . . . . . . . . . . . . . . . . 731 Overview of the Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 Loading the Tree Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 Refreshing the Tree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 Trees and Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 Tree Error Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 35 Customizing Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 Workflow Step Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 Workflow Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743 Step Action Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744

Oracle WebCenter Sites Developers Guide

Table of Contents

19

Timed Action Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746 Deadlock Action Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 Group Deadlock Action Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751 Delegation Action Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753

Part 6. Web Services36 Overview of Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 What Are Web Services? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 SOAP and Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 Supported SOAP Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 Supported WSDL Version. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 Related Programming Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 37 Creating and Consuming Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . 761 Using Predefined Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762 Accessible Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762 WSDL File Location. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762 Process Flow for Predefined Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762 Consider Your Data for Predefined Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . 763 Generating the Client Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763 Writing Client Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763 Creating Custom Web Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763 Process Flow for Creating Custom Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . 764 Consider Your Data for Custom Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764 Creating a WebCenter Sites Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764 Writing a WebCenter Sites Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765 Creating a WSDL File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767

Part 7. Engage38 Creating Visitor Data Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771 About Visitor Data Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 Visitor Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 History Attributes and History Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772 Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 Developing Visitor Data Assets: Process Overview. . . . . . . . . . . . . . . . . . . . . . . . . 773 Creating Visitor Data Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774 Creating Visitor Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774 Creating History Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778 Creating History Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781 Verifying Your Visitor Data Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

Oracle WebCenter Sites Developers Guide

Table of Contents

20

Approving Visitor Data Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783 39 Recommendation Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 Development Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 Creating a Dynamic List Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 40 Coding Engage Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 Commerce Context and Visitor Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 Identifying Visitors and Linking Sessions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790 Collecting Visitor Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 Coding Site Pages That Collect Visitor Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792 Templates and Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794 Creating Templates for Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795 Shopping Carts and Engage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795 Debugging Site Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796 Session Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796 Visitor Data Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796 Recommendations and Promotions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797 41 Memory-Centric Visitor Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 Database-centric Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 Memory-centric Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 Enabling Memory-centric Visitor Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801 Visitor Tracking Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801 Supporting Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801 Batch-Saving History Attributes to the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 How Memory-centric Visitor Tracking Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 1. Visitor Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 802 2. Retrieving Scalar Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804 3. Collecting History Attribute Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805 4. Computing Sums and Counts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806 5. Computing Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807 6. Determining and Displaying Recommended Assets. . . . . . . . . . . . . . . . . . . . . . . 808 Logging Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809

Part 8. API Reference42 Asset API . . . . . . . . . . . . . . . . . .