902
Oracle® WebCenter Sites Developer’s Guide 11g Release 1 (11.1.1) April 2012

webcenter_sites_11gr1_developer_guide.pdf

  • Upload
    onidojo

  • View
    137

  • Download
    5

Embed Size (px)

Citation preview

  • 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.

  • 3Oracle WebCenter Sites Developers Guide

    Table of

    Contents

    About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23

    1 Introducing Oracle WebCenter Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27From the Content Entry Form to the Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Developing a Dynamic Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30WebCenter Sites Data Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Presentation Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    Element Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31APIs and JSP Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Sessions and Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33WebCenter Sites Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Website Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    WebCenter Sites Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Approval and Publishing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Performance: Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    Page Caching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Resultset Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Asset Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Satellite Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

    WebCenter Sites Interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Sample Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    Part 1. Overview

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

  • Table of Contents4

    Oracle WebCenter Sites Developers Guide

    Sites and the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    3 Oracle WebCenter Sites Development Process . . . . . . . . . . . . . . . . . . . . . . 51Step 1: Set Up the Team . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Step 2: Create Functional and Design Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

    Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52Page Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Caching Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Security Strategy (Access Control). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Separate Format from Content (Elements from Assets) . . . . . . . . . . . . . . . . . . . . . . . 53Data Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    Step 3: Set Management System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Step 4: Implement the Data Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Step 5: Build the Online Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57Step 6: Set Up the Management System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    Import Content as Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Import Catalog Data and Flex Asset Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Instruct the Editorial Team About Site Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    Step 7: Set Up the Delivery System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Step 8: Publish to the Delivery System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

    Part 2. Programming Basics

    4 Programming with Oracle WebCenter Sites . . . . . . . . . . . . . . . . . . . . . . . . . 63Choosing a Coding Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64The Oracle WebCenter Sites Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    The ICS Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64The FTCS tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

    WebCenter Sites JSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65WebCenter Sites Standard Beginning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65JSP Implicit Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Scriptlets and Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69JSP Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Oracle WebCenter Sites Tag Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    WebCenter Sites XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72WebCenter Sites Standard Beginning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72XML Entities and Reserved Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73XML Parsing Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

    WebCenter Sites Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Tags That Create the WebCenter Sites Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Tags That Handle Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

  • Table of Contents5

    Oracle WebCenter Sites Developers Guide

    Tags That Call Pages and Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Tags That Create URLs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Tags That Control Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Tags That Set Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Programming Construct Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Tags That Manage Compositional and Approval Dependencies . . . . . . . . . . . . . . . . 79Tags That Retrieve Information About Basic Assets . . . . . . . . . . . . . . . . . . . . . . . . . 80Tags That Create Assetsets (Flex Assets) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Tags That Create Searchstates (Flex Assets) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

    Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Reserved Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Setting Regular Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Setting Session Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Working With Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Variables and Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Best Practices with Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

    Other WebCenter Sites Storage Constructs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Built-ins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

    Values for Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

    5 Page Design and Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Modular Page Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

    WebCenter Sites Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99BlobServer and Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Satellite Server Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

    Viewing the Contents of the Satellite Server Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105CacheManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106The SiteCatalog Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106The Cache Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Caching Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    Double-Buffered Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Implementing Double-Buffered Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Setting cscacheinfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Coding for Caching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Caching and Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

    6 Intelligent Cache Management with WebCenter Sites . . . . . . . . . . . . . . . . 117WebCenter Sitess Rendering Engine Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118CacheManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118Enabling CacheManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

    Tier 1 Cache Configuration Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Tier 2 Cache Configuration Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

  • Table of Contents6

    Oracle WebCenter Sites Developers Guide

    7 Advanced Page Caching Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Configuring the WebCenter Sites Cache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Configuring the Blob Server Cache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Configuring the Satellite Server Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127CacheInfo String Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

    CacheInfo String: First Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128CacheInfo String: Second Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Page Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Absolute Moment in Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129TimePattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Wildcard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Blank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

    8 WebCenter Sites Tools and Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Oracle WebCenter Sites Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

    Connecting to a WebCenter Sites Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132CatalogMover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

    Starting CatalogMover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Connecting to WebCenter Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134CatalogMover Menu Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Exporting Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Importing Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

    Property Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142Starting the Property Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142Setting Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Merging Property Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    XMLPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

    9 Sessions and Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145What Is a Session? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Session Lifetime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

    Session Variables Maintained by WebCenter Sites . . . . . . . . . . . . . . . . . . . . . . . . . 146Logging In and Logging Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

    Sessions Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147FeelingsForm Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147SetFeeling Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Meat Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

    What Is a Cookie? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149CookieServer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Cookie Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

    Cookie Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150Start.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150ColorForm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

  • Table of Contents7

    Oracle WebCenter Sites Developers Guide

    CreateCookie. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151DisplayWelcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151Running the Cookie Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

    Tips and Tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152Satellite Server Session Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

    Flushing Session Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

    10 Error Logging and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Logging to the WebCenter Sites Log File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Using Error Codes with Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

    Tag Examples Using Error Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Error Number Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

    Part 3. Data Design

    11 Data Design: The Asset Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161Asset Types and Asset Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

    Two Data Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Default Core Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Which Asset Model Should You Use to Represent Your Content? . . . . . . . . . . . . . 164

    The Basic Asset Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Basic Asset Types from the Burlington Financial Sample Site . . . . . . . . . . . . . . . . 166Relationships Between Basic Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Category, Source, and Subtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Basic Asset Types and the Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

    The Flex Asset Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174The Flex Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175Sample Site Flex Families. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176Flex Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177Flex Parents and Flex Parent Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179Flex Assets and Flex Definition Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181Flex Families and the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

    Assetsets and Searchstates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185Search Engines and the Two Asset Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186Tags and the Two Asset Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186Summary: Basic and Flex Asset Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

    Where the Asset Models Intersect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187Where the Asset Models Differ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

    Summary: Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

    12 The WebCenter Sites Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191Types of Database Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

    Object Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

  • Table of Contents8

    Oracle WebCenter Sites Developers Guide

    Tree Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193Content Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Foreign Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195Identifying a Tables Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

    Types of Columns (Fields) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Generic Field Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Database-Specific Field Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198Indirect Data Storage with the WebCenter Sites URL Field . . . . . . . . . . . . . . . . . . 199

    Creating Database Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200Creating Object Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200Creating Tree Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Creating Content Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Registering a Foreign Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

    How Information Is Added to the System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208Property Files and Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

    13 Managing Data in Non-Asset Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211Methods and Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

    Writing and Retrieving Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212Querying for Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214Lists and Listing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

    Coding Data Entry Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Adding a Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Deleting a Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219Querying a Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221Querying a Table with an Embedded SQL Statement . . . . . . . . . . . . . . . . . . . . . . . 229

    Managing the Data Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234Deleting Non-Asset Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

    14 Resultset Caching and Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

    Caching Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236Database Queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236How Resultset Caching Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236Reducing the Load on the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

    Specifying the Table Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237SELECTTO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237EXECSQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238CALLSQL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238Search Forms in the WebCenter Sites Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238Query Asset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238SEARCHSTATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

    Flushing the Resultset Cache. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239Switching Between Caching Frameworks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

  • Table of Contents9

    Oracle WebCenter Sites Developers Guide

    Configuring Resultset Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240Planning Your Resultset Caching Strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240Default Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240Table-Specific Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

    Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

    15 Designing Basic Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243The AssetMaker Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

    How AssetMaker Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244Asset Descriptor Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248Columns in the Asset Types Database Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250Elements and SQL Statements for the Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . 254

    Creating Basic Asset Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Step 1: Code the Asset Descriptor File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259Step 2: Upload the Asset Descriptor File to WebCenter Sites . . . . . . . . . . . . . . . . . 267Step 3: Create the Asset Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269Step 4: Configure the Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270Step 5: Enable the Asset Type on Your Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272Step 6: Fine-Tune the Asset Descriptor File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272Step 7: (Optional) Customize the Asset Type Elements. . . . . . . . . . . . . . . . . . . . . . 272Step 8: (Optional) Configure Subtypes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276Step 9: (Optional) Configure Association Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . 277Step 10: (Optional) Configure Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279Step 11: (Optional) Configure Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280Step 12: (Conditional) Add Mimetypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281Step 13: (Optional) Edit Search Elements to Enable Indexed Search . . . . . . . . . . . 282Step 14: Create and Assign Asset Type Icons (Contributor Interface Only) . . . . . . 283Step 15: Code Templates for the Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283Step 16: Move the Asset Types to Other Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 283

    Deleting Basic Asset Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

    16 Designing Flex Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285Design Tips for Flex Families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286

    Visitors on the Delivery System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286Users on the Management System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286How Many Attribute Types Should You Create?. . . . . . . . . . . . . . . . . . . . . . . . . . . 287Designing Flex Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287How Many Definition Types Should You Create?. . . . . . . . . . . . . . . . . . . . . . . . . . 289Designing Parent Definition and Flex Definition Assets . . . . . . . . . . . . . . . . . . . . . 289Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

    The Flex Family Maker Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291The Flex Asset Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

    Creating a Flex Asset Family . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

  • Table of Contents10

    Oracle WebCenter Sites Developers Guide

    Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293Step 1: Create a Flex Family. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293Step 2: (Optional) Create Additional Flex Family Members . . . . . . . . . . . . . . . . . . 296Step 3: Enable the New Flex Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296Step 4: Create Flex Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297Step 5: (Optional) Create Flex Filter Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301Step 6: Create Parent Definition Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303Step 7: Create Flex Definition Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305Step 8: Create Flex Parent Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306Step 9: Create and Assign Asset Type Icons (Contributor Interface Only) . . . . . . . 308Step 10: Code Templates for the Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309Step 11: Test Your Design (Create Test Flex Assets) . . . . . . . . . . . . . . . . . . . . . . . 309Step 12 (Optional): Create Flex Asset Associations. . . . . . . . . . . . . . . . . . . . . . . . . 309Step 13: Move the Asset Types to Other Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 310

    Editing Flex Attributes, Parents, and Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311Editing Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311Editing Parent Definitions and Flex Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . 311Editing Parents and Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

    Using Product Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312What Is a Product Set? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312Creating Product Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

    17 Flex Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

    Flex Filter Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316Flex Filter Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

    Defining a Flex Filter Class and Creating a Flex Filter Asset. . . . . . . . . . . . . . . . . . . . . 319Implementing a Flex Filter Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319Defining a Custom Flex Filter Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Creating Flex Filter Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

    Document Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329Default Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329Custom Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329Customizing Document Transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

    18 Designing Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336

    The presentationobject.dtd File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337The Attribute Editor Asset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339The Attribute Editor Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346Conventions for the Attribute Editor Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

    Creating Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348Customizing Attribute Editors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

  • Table of Contents11

    Oracle WebCenter Sites Developers Guide

    Example: Customized Attribute Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350Editing Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

    19 Configuring Bundled Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357Configuring CKEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

    Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358Creating a CKEditor Instance and Enabling It for a Field . . . . . . . . . . . . . . . . . . . . 358Enabling CKEditor for Use in Web Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360Enabling Selected Asset Types for the CKEditor. . . . . . . . . . . . . . . . . . . . . . . . . . . 362Setting the Approval Dependency for Included Assets . . . . . . . . . . . . . . . . . . . . . . 363Enable Image Picker for the CKEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364Customizing the CKEditor Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365Configuring Spell Check Support in CKEditor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

    Configuring the Clarkii Online Image Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368Creating a Clarkii OIE Instance and Enabling it for a Field. . . . . . . . . . . . . . . . . . . 369Configuring Clarkii OIE Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371Implementing a Field Copier Filter to Classify Assets . . . . . . . . . . . . . . . . . . . . . . . 375

    Configuring the Image Picker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378Categorizing Image Assets for Display in Image Picker . . . . . . . . . . . . . . . . . . . . . 379Sample Image Picker Attribute Editor Definition Code . . . . . . . . . . . . . . . . . . . . . . 379

    20 Importing Assets of Any Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381The XMLPost Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382

    Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382XMLPost Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

    Configuration Properties for XMLPost. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384Configuration Properties for the Posting Element . . . . . . . . . . . . . . . . . . . . . . . . . . 386Configuration Properties for the Source Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389Sample XMLPost Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392

    XMLPost Source Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394Sample XMLPost Source File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394XMLPost and File Encoding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

    Using the XMLPost Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395Running XMLPost from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396Running XMLPost as a Batch Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398Running XMLPost Programmatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399

    Customizing RemoteContentPost and PreUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399Setting a Field Value Programmatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399Setting an Asset Association. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400

    Troubleshooting XMLPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401Debugging the Posting Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402

    21 Importing Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404

  • Table of Contents12

    Oracle WebCenter Sites Developers Guide

    Importing the Data Structure Flex Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404Importing the Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404Importing Flex Assets: The Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404Using Custom Data Delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

    XMLPost and the Flex Asset Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407Internal Names vs. External Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

    Importing the Structural Asset Types in the Flex Model . . . . . . . . . . . . . . . . . . . . . . . . 408Attribute Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408Flex Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410Flex Definitions and Flex Parent Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Flex Parents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

    Importing Flex Assets with XMLPost. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418Configuration File Properties and Source File Tags for Flex Assets . . . . . . . . . . . . 419Sample Flex Asset Configuration File for addData . . . . . . . . . . . . . . . . . . . . . . . . . 422Sample Flex Asset Source File for addData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424Sample Flex Asset Configuration File for RemoteContentPost . . . . . . . . . . . . . . . . 427Sample Flex Asset Source File for RemoteContentPost. . . . . . . . . . . . . . . . . . . . . . 428

    Editing Flex Assets with XMLPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429Configuration Files for Editing Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430Source Files for Editing Flex Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430

    Deleting Assets with XMLPost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431Configuration Files for Deleting Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432Source Files for Deleting Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432

    22 Importing Flex Assets with the BulkLoader Utility . . . . . . . . . . . . . . . . . . . 433Overview of BulkLoader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434

    BulkLoader Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434How BulkLoader Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434Using the BulkLoader Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435

    Importing Flex Assets from Flat Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436Step 1: Use XMLPost to Import Structural Assets . . . . . . . . . . . . . . . . . . . . . . . . . . 437Step 2: Create the Input Table (Data Source) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437Step 3: Create the Mapping Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439Step 4: Create the BulkLoader Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . 440Step 5: Run the BulkLoader Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447Step 6: Review Feedback Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448Step 7: Approve and Publish the Assets to the Delivery System . . . . . . . . . . . . . . . 448

    Importing Flex Assets Using a Custom Extraction Mechanism . . . . . . . . . . . . . . . . . . . 448IDataExtract Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449IPopulateDataSlice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452IFeedback Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

    Approving Flex Assets with the BulkApprover Utility. . . . . . . . . . . . . . . . . . . . . . . . . . 457Configuring BulkApprover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457Using BulkApprover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

  • Table of Contents13

    Oracle WebCenter Sites Developers Guide

    Part 4. Site Development

    23 Creating Template, CSElement, and SiteEntry Assets. . . . . . . . . . . . . . . . 463Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464Pages, Pagelets, and Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464

    Elements, Pagelets, and Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465Calling Pages and Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465Page vs. Pagelet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

    CSElement, Template, and SiteEntry Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467Template Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468CSElement Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470What About Non-Asset Elements? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470

    Creating Template Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472Procedures for Creating Template Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

    Creating CSElement Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494Procedures for Creating CSElement Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495

    Creating SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506Procedures for Creating SiteEntry Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506

    Managing Template, CSElement, and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . 512Designating Default Approval Templates (Static Publishing Only). . . . . . . . . . . . . 512Editing Template, CSElement, and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . 512Sharing Template, CSElement, and SiteEntry Assets. . . . . . . . . . . . . . . . . . . . . . . . 513Deleting Template, CSElement, and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . 513Previewing Template, CSElement, and SiteEntry Assets. . . . . . . . . . . . . . . . . . . . . 514

    Using Oracle WebCenter Sites Explorer to Create and Edit Element Logic . . . . . . . . . 515Creating Templates and CSElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516Editing Templates and CSElements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516

    24 Creating Templates and Wrappers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517Working with Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518

    Layout Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518Pagelet Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527Page Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

    Working with Wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531Creating a Wrapper Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532Wrappers and Previewing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

    25 Coding Templates for In-Context and Presentation Editing . . . . . . . . . . . 535Coding Templates for In-Context Content Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536

    Attribute Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536String Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537

  • Table of Contents14

    Oracle WebCenter Sites Developers Guide

    Text Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539Date Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540Binary Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541Asset Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543Number Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547Multivalued Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

    Coding Templates for Presentation Editing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555Selecting a Different Layout for the Entire Web Page . . . . . . . . . . . . . . . . . . . . . . . 556Selecting a Different Layout for a Page Fragment . . . . . . . . . . . . . . . . . . . . . . . . . . 557Editing Presentation and Content Simultaneously . . . . . . . . . . . . . . . . . . . . . . . . . . 564Understanding the Context System Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567Using Slots with CSElement and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . 570Constraining Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571Preventing CSS and JavaScript Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572

    Creating Content using the In-Context UI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573Defining a Start Menu for In-Context Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573Providing Layout Templates for In-Context Creation . . . . . . . . . . . . . . . . . . . . . . . 574Providing Empty Value Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575Providing Editing-Specific Presentation Logic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575

    26 Creating Collection Assets, Query Assets, and Page Assets . . . . . . . . . . 577Collection Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578

    Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578Creating Collection Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578Sharing Collection Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580

    Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580Query Assets and Other Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580How the Query Is Stored. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581Commonly Used Fields for Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583Creating Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584Sharing Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586Previewing and Approving Query Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586

    Page Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586Page Asset Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587Creating a Page Asset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588Placing Page Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591Moving Page Assets in the Site Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591Placing Page Assets and Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593Editing Page Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593Deleting Page Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593

    27 Best Practices for Creating Future Site Preview Assets and Templates . 595Considerations when Implementing Future Site Preview . . . . . . . . . . . . . . . . . . . . . . . 596Creating Sets of Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596

  • Table of Contents15

    Oracle WebCenter Sites Developers Guide

    Writing Templates for Future Site Preview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596The asset:filterassetsbydate tag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597The Input List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597

    Caching Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599

    28 Coding Elements for Templates and CSElements . . . . . . . . . . . . . . . . . . . 601About Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602

    The Publishing System and Approval Dependencies . . . . . . . . . . . . . . . . . . . . . . . . 602Page Generation and Compositional Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . 607

    About Coding to Log Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608ASSET.LOAD and asset:load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608The ASSETSET (assetset) Tag Family. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608RENDER.GETPAGEURL and render:getpageurl . . . . . . . . . . . . . . . . . . . . . . . . . . 609RENDER.LOGDEP (render:logdep) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610RENDER.FILTER and render:filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611RENDER.UNKNOWNDEPS and render:unknowndeps . . . . . . . . . . . . . . . . . . . . . 611

    Calling CSElement and SiteEntry Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612Coding Elements to Display Basic Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612

    Assets That Represent Simple Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613Associations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615ImageFile Assets or Other Blob Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615Basic Assets That Can Have Embedded Links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618Page Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619

    About Coding Elements that Display Flex Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621Assetsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622Searchstates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622Assetsets, Searchstates, and Flex Attribute Asset Types . . . . . . . . . . . . . . . . . . . . . 623Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624

    Coding Templates That Display Flex Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624Example Data Set for the Examples in This Section . . . . . . . . . . . . . . . . . . . . . . . . 624Examples of Assetsets with One Product (Flex Asset). . . . . . . . . . . . . . . . . . . . . . . 626Special Cases: Flex Attributes of Type Text, Blob, and URL . . . . . . . . . . . . . . . . . 628Examples of Assetsets with More Than One Product (Flex Asset) . . . . . . . . . . . . . 631

    Creating URLs for Hyperlinks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635RENDER.GETPAGEURL (render:getpageurl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636RENDER.SATELLITEBLOB (render:satelliteblob) . . . . . . . . . . . . . . . . . . . . . . . . 636RENDER.GETBLOBURL (render:getbloburl) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637Using the referURL Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637

    Handling Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638Using the Errno Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638Ensuring that Incorrect Pages Are Not Cached . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639

  • Table of Contents16

    Oracle WebCenter Sites Developers Guide

    29 Template Element Examples for Basic Assets . . . . . . . . . . . . . . . . . . . . . . 641Example 1: Basic Modular Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642

    First Element: Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643Second Element: MainStoryList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643Third Element: LeadSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644Fourth Element: TeaserSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645Back to LeadSummary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645Back to MainStoryList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646Back to Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646

    Example 2: Coding Links to the Article Assets in a Collection Asset . . . . . . . . . . . . . . 646First element: SectionFront. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647Second element: PlainList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648

    Example 3: Using the ct Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649First Element: SectionFront . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650Second Element: TextOnlyLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651ColumnistFront . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652

    Example 4: Coding Templates for Query Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653First Element: Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653Second Element: WireFeedBox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654Third Element: ExecuteQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655Back to WireFeedBox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655

    Example 5: Displaying an Article Asset Without a Template. . . . . . . . . . . . . . . . . . . . . 656First Element: Full . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656Second Element: AltVersionBlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657Third Element: EmailFront . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657

    Example 6: Displaying Site Plan Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658First Element: Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658Second Element: SiteBanner. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658Third Element: TopSiteBar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659Back to SiteBanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661

    Example 7: Displaying Non-Asset Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661First Element: Home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661Second Element: ShowMainDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661

    30 Configuring Sites for Multilingual Support . . . . . . . . . . . . . . . . . . . . . . . . . 663Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664

    Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664Dimension Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664Cross-Site Multilingual Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665Master Assets, Translations, and Multilingual Sets . . . . . . . . . . . . . . . . . . . . . . . . . 666Translations and Asset Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667Approval Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668

    Working with Locale Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668Handling Asset Relationships Through Locale Filtering . . . . . . . . . . . . . . . . . . . . . 669Included Locale Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669

  • Table of Contents17

    Oracle WebCenter Sites Developers Guide

    Custom Locale Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671Compositional Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671Adding Filtering Support to Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673

    Planning Multilingual Support for a Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675Configuring Multilingual Support for a Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676

    Configuration Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676Enabling the Dimension and DimensionSet Asset Types . . . . . . . . . . . . . . . . . 677Enabling the Locale Subtype of the Dimension Asset Type . . . . . . . . . . . . . . . 678Creating a Locale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678Sharing a Locale to Another Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679Creating and Configuring a Dimension Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679Sharing a Dimension Set to Another Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680Configuring a Locale Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681Configuring the Fallback Hierarchy of the Hierarchical Filter . . . . . . . . . . . . . . . . 682Bulk-Assigning a Default Locale to Assets in a Site . . . . . . . . . . . . . . . . . . . . . . . . 683

    31 User Management on the Delivery System . . . . . . . . . . . . . . . . . . . . . . . . . 687The Directory Services API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688

    Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688Directory Services Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689Directory Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693Troubleshooting Directory Services Applications . . . . . . . . . . . . . . . . . . . . . . . . . . 693

    Controlling Visitor Access to Your Online Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694ACL Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694User Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695WebCenter Sites and Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695

    Creating Login Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695Prompt for Login (PromptForLogin.xml). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695Root Element for the Login Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696

    Creating User Account Creation Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697PromptForNewAccount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697Root Element for the CreateAccount Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698

    Visitor Access in the Burlington Financial Sample Site . . . . . . . . . . . . . . . . . . . . . . . . . 701Membership Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701Users and Passwords. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701Member Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701Membership Processing Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701

    32 The HelloAssetWorld Sample Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704

    HelloAssetWorld Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704HelloAssetWorld Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705

  • Table of Contents18

    Oracle WebCenter Sites Developers Guide

    Modified Asset Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705The HelloArticle Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705The HelloImage Asset Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706

    HelloAssetWorld Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707The HelloArticle Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707The HelloCollection Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710The HelloPage Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713

    The HelloQuery Asset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715

    33 The Burlington Financial Sample Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718Navigation Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719

    Breadcrumbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720Best Practices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721

    Searching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721Hot Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721Topic Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722Related Stories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723Text-Only Versions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724Plain Text Parallel Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724E-mail This Story . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725AssetMaker Asset Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725Mimetype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725Collections of Collections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726Membership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726Wire Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727Featured Funds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727Fund Finder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727Page Cache Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728

    Part 5. Management System Features

    34 Customizing the WebCenter Sites Admin Interface . . . . . . . . . . . . . . . . . . 731Overview of the Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732

    Loading the Tree Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732Refreshing the Tree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739

    Trees and Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740Tree Error Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740

    35 Customizing Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741Workflow Step Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742Workflow Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743

    Step Action Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744

  • Table of Contents19

    Oracle WebCenter Sites Developers Guide

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

    Part 6. Web Services

    36 Overview of Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757What Are Web Services? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758SOAP and Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758Supported SOAP Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759Supported WSDL Version. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759Related Programming Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759

    37 Creating and Consuming Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . 761Using Predefined Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762

    Accessible Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762WSDL File Location. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762Process Flow for Predefined Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762Consider Your Data for Predefined Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . 763Generating the Client Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763Writing Client Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763

    Creating Custom Web Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763Process Flow for Creating Custom Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . 764Consider Your Data for Custom Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764Creating a WebCenter Sites Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764Writing a WebCenter Sites Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765Creating a WSDL File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767

    Part 7. Engage

    38 Creating Visitor Data Assets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771About Visitor Data Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772

    Visitor Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772History Attributes and History Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773Developing Visitor Data Assets: Process Overview. . . . . . . . . . . . . . . . . . . . . . . . . 773

    Creating Visitor Data Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774Creating Visitor Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774Creating History Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778Creating History Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781

    Verifying Your Visitor Data Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

  • Table of Contents20

    Oracle WebCenter Sites Developers Guide

    Approving Visitor Data Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

    39 Recommendation Assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786

    Development Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786Creating a Dynamic List Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787

    40 Coding Engage Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789Commerce Context and Visitor Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790Identifying Visitors and Linking Sessions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790Collecting Visitor Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791

    Coding Site Pages That Collect Visitor Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792Templates and Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794

    Creating Templates for Recommendations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795Shopping Carts and Engage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795Debugging Site Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796

    Session Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796Visitor Data Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796Recommendations and Promotions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797

    41 Memory-Centric Visitor Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800

    Database-centric Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800Memory-centric Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800

    Enabling Memory-centric Visitor Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801Visitor Tracking Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801Supporting Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801Batch-Saving History Attributes to the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . 802

    How Memory-centric Visito