Developing for Oracle Webcenter Portal Cloud Service
Total Page:16
File Type:pdf, Size:1020Kb
Oracle® Cloud Developing for Oracle WebCenter Portal Cloud Service E80292-09 May 2018 Oracle Cloud Developing for Oracle WebCenter Portal Cloud Service, E80292-09 Copyright © 2017, 2018, Oracle and/or its affiliates. All rights reserved. Primary Author: Oracle Corporation 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, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. 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 about 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 unless otherwise set forth in an applicable agreement between you and Oracle. 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, except as set forth in an applicable agreement between you and Oracle. Contents Preface Audience xxi Documentation Accessibility xxii Related Documents xxii Conventions xxii Who's Who Knowledge Worker xxiii Application Specialist xxiv Web Developer xxv Developer xxvi System Administrator xxvii Part I Getting Started 1 Introduction to Developing for WebCenter Portal Cloud Service 1.1 What Is the Purpose of This Guide? 1-1 1.2 What Is My Role as a WebCenter Portal Cloud Service Developer? 1-2 2 Setting Up a Development Environment 2.1 Introduction to Setting up a Development Environment 2-1 2.2 Basic Setup Tasks 2-1 2.2.1 Installing Oracle JDeveloper 2-1 2.2.2 Installing the WebCenter Portal Cloud ServiceExtensions for JDeveloper 2-2 2.2.3 Setting the User Home Directory Environment Variable 2-2 2.2.4 Managing the Integrated WebLogic Server 2-2 2.2.4.1 What is the Integrated WebLogic Server? 2-3 2.2.4.2 Starting and Stopping Integrated WebLogic Server 2-3 2.2.4.3 Configuring the JVM for the Integrated WebLogic Server 2-3 iii 2.2.5 Creating Application Resource Connections 2-3 2.2.5.1 Where Are Connections Located? 2-4 2.2.5.2 How Do I Access the Connection Wizards? 2-4 2.3 Setup Tasks Specific to WebCenter Portlet Producer Applications 2-5 2.3.1 Deploying the Preconfigured Portlet Producers 2-5 2.3.2 Accessing OmniPortlet 2-6 2.3.3 WSRP Sample Portlet Producers and Portlets 2-6 2.3.4 PDK-Java Sample Portlet Producer and Portlets 2-7 Part II Working with WebCenter Portal Cloud Service Assets 3 Introduction to WebCenter Portal Cloud Service Assets 3.1 About Working with WebCenter Portal Cloud Service Assets 3-1 3.2 Developing Assets for WebCenter Portal Cloud Service 3-2 3.2.1 Setting Up Your JDeveloper Environment for Asset Development 3-2 4 Working with the WebCenter Portal Asset Application Template 4.1 About the WebCenter Portal Asset Application Template 4-1 4.2 Creating a WebCenter Portal Asset Application 4-1 4.2.1 How to Create a WebCenter Portal Asset Application 4-2 4.2.2 What You May Need to Know About Asset Application Artifacts 4-5 4.3 Creating and Editing WebCenter Portal Assets 4-5 4.4 Publishing WebCenter Portal Assets 4-6 4.4.1 Creating a WebCenter Portal Server Connection 4-6 4.4.2 Publishing a WebCenter Portal Asset 4-8 4.5 Testing WebCenter Portal Assets 4-10 5 Developing Layouts 5.1 About Developing Layouts 5-1 5.2 Creating a Layout 5-1 5.2.1 How to Create a Layout 5-1 5.2.2 What You May Need to Know About Layout Artifacts 5-2 5.3 Editing a Layout 5-4 5.4 Publishing a Layout 5-5 6 Developing Page Styles 6.1 About Developing Page Styles 6-1 iv 6.2 Best Practices for Creating Page Styles 6-2 6.3 Creating a Page Style 6-3 6.3.1 How to Create a Page Style 6-3 6.3.2 What You May Need to Know About Page Style Artifacts 6-4 6.4 Editing a Page Style 6-6 6.5 Publishing a Page Style 6-6 7 Developing Page Templates 7.1 Introduction to Developing Page Templates 7-1 7.1.1 Understanding Page Templates 7-1 7.1.2 Understanding Page Template Structure 7-2 7.1.3 Understanding Page Template Layout 7-3 7.1.4 Understanding Page Template Layout Components 7-4 7.2 Best Practices for Developing Page Templates 7-6 7.2.1 Best Practices for Creating Stretching Layouts 7-10 7.2.2 Best Practices for Creating Flowing Layouts 7-11 7.2.3 Best Practices for Developing Page Templates That Can Be Edited at Runtime 7-11 7.2.4 Best Practices for Customizing the Appearance of Components 7-12 7.2.5 Best Practices for Defining Scrolling in a Page Template 7-13 7.2.6 Best Practices for Defining Margins, Borders, and Padding 7-13 7.3 Creating a Page Template 7-14 7.3.1 About Creating Page Templates 7-14 7.3.2 How to Create a Page Template 7-15 7.3.3 What You May Need to Know About Page Template Artifacts 7-16 7.4 Editing a Page Template 7-17 7.5 Adding a Floating Toolbar to a Page Template 7-18 7.6 Adding Navigation to a Page Template 7-18 7.6.1 About Visualizing Portal Navigation 7-18 7.6.2 Using the Navigation Expression Language APIs 7-20 7.6.2.1 Introduction to the Navigation Context 7-20 7.6.2.2 Introduction to the Navigation Runtime Model 7-22 7.6.2.3 Introduction to the Navigation Resource 7-23 7.6.2.4 How to Render the Navigation Model as a List of Links 7-25 7.6.2.5 How to Render the Navigation Model as a Tree 7-26 7.6.2.6 How to Render the Navigation Model as a Three-Level Menu 7-27 7.6.2.7 How to Render the Navigation Model as Breadcrumbs 7-28 7.6.2.8 How to Render Master-Detail Navigation 7-29 7.6.3 Tips for Visualizing Portal Navigation 7-31 7.7 Publishing a Page Template 7-32 v 7.8 Page Template Tutorials and Examples 7-32 8 Developing Skins 8.1 Introduction to Developing Skins 8-1 8.1.1 About Skins 8-1 8.1.2 About Runtime Management of Skins 8-1 8.2 Best Practices for Developing Skins 8-2 8.3 Creating a Skin 8-2 8.3.1 How to Create a Skin 8-2 8.3.2 What You May Need to Know About Skin Artifacts 8-3 8.4 Editing a Skin 8-4 8.5 Publishing a Skin 8-5 8.6 Conditionally Changing Skins for Users 8-5 9 Developing Visualization Templates 9.1 About Visualization Templates 9-1 9.2 Creating a Visualization Template 9-2 9.2.1 How to Create a Visualization Template 9-2 9.2.2 What You May Need to Know About Visualization Template Artifacts 9-3 9.3 Editing a Visualization Template 9-4 9.3.1 Placeholder EL Binding in Visualization Templates 9-5 9.4 Publishing a Visualization Template 9-10 9.5 What Happens at Runtime 9-10 10 Developing Content Presenter Display Templates 10.1 Introduction to Developing Content Presenter Display Templates 10-1 10.2 Creating a Content Presenter Display Template 10-3 10.2.1 How to Create a Content Presenter Display Template 10-3 10.2.2 What You May Need to Know About Content Presenter Display Templates 10-4 10.3 Editing a Content Presenter Display Template 10-6 10.3.1 How to Define a Single-Item Display Template 10-6 10.3.2 Content Display Template Tags for Single Content Items 10-8 10.3.3 How to Define a Multiple-Item Display Template 10-10 10.3.4 Content Display Template Tags for Multiple Content Items 10-11 10.3.5 How to Use Responsive Templates 10-13 10.3.5.1