Skip Headers
Oracle® Fusion Middleware Portlet Development Guide for Oracle WebLogic Portal
10
g
Release 3 (10.3.4)
Part Number E14244-05
Home
Contact Us
Next
View PDF
Contents
List of Examples
List of Figures
List of Tables
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documents
Conventions
1
Introduction
1.1
Portlet Overview
1.2
Portlet Development and the Portal Life Cycle
1.2.1
Architecture
1.2.2
Development
1.2.3
Staging
1.2.4
Production
1.3
Getting Started
1.3.1
Prerequisites
1.3.2
Related Guides
Part I Architecture
2
Portlet Planning
2.1
Portlet Development in a Distributed Portal Team
2.2
Portlets in a Non-Portal Environment
2.3
Planning Portlet Instances
2.4
Security
2.5
Interportlet Communication
2.6
Performance Planning
3
Portlet Types
3.1
Java Server Faces (JSF) Portlets
3.2
Java Server Page (JSP) and HTML Portlets
3.3
Java Portlets
3.4
Java Page Flow Portlets
3.5
Struts Portlets
3.6
Browser (URL) Portlets
3.7
Clipper Portlets
3.8
Remote (Proxy) Portlets
3.9
Portlet Type Summary Table
Part II Development
4
Understanding Portlet Development
4.1
Portlet Components
4.1.1
Portlet Properties
4.1.2
Portlet Title Bar, Mode, and State
4.1.3
Portlet Preferences
4.2
Resources for Creating Portlets
4.3
Portlet Rendering
4.3.1
Render and Pre-Render Forking
4.3.2
Asynchronous Portlet Content Rendering
4.3.3
Portlets as Popups (Detached Portlets)
4.4
JSP Tags and Controls in Portlets
4.5
Backing Files
4.6
Support for Apache Portals Bridges
5
Creating Portlets
5.1
Supported Portlet Types
5.2
Portlets in J2EE Shared Libraries
5.3
Portlet Wizard Reference
5.3.1
Order of Creation - Resource or Portlet First
5.3.1.1
Creating the Resource First
5.3.1.2
Create the Portlet First
5.3.2
Starting the Portlet Wizard
5.3.3
New Portlet Dialog
5.3.4
Select Portlet Type Dialog
5.3.5
Portlet Details Dialogs
5.4
How to Build Each Type of Portlet
5.4.1
Building JSP and HTML Portlets
5.4.2
Building JSF Portlets
5.4.3
Building Java Portlets
5.4.4
Building Browser Portlets
5.4.5
Building Clipper Portlets
5.4.6
Building Struts Portlets
5.4.7
Building Remote Portlets
5.4.8
Building Java Page Flow Portlets
5.5
Assigning Supporting Files
5.5.1
Adding a Render Dependencies File
5.5.2
Adding a Backing File
5.6
Adding a Portlet to a Portal
5.7
Deleting Portlets
6
Building Java Portlets
6.1
Building a Java Portlet
6.2
Java Portlet Deployment Descriptor
6.3
Portlet Modes and States
6.4
Portlet Preferences
6.5
Portlet Initialization Parameters
6.6
Portlet Filters
6.7
Order of Portlet Filters
6.8
Public Render Parameters
6.8.1
Public Render Parameter Example
6.9
Event Handling with Java Portlets
6.10
Deleting Java Portlet Features
6.11
Using Container Runtime Options
6.11.1
Standard Container Runtime Options
6.11.2
Other Container Runtime Options Supported by WLP
6.12
Using Global (Shared) Properties
6.13
Setting Portlet-Level Container Runtime Options
6.14
Adding Custom Portlet Modes
6.15
Using Special Portlet Request Attributes
6.16
Using Portlet-Served Resource Links
6.16.1
Using Direct Links
6.16.2
Using Portlet-Served Resource Links
6.17
Exporting Java Portlets for Use on Other Systems
6.18
Importing Java Portlets
6.18.1
Importing Java Portlets Into Your Eclipse Workspace
6.18.1.1
Starting the Import Wizard
6.18.1.2
Using the Import Wizard
6.18.1.3
Accessing the Portlets
6.18.2
Importing and Deploying JSR 286 Portlets in the Administration Console
6.19
JSR-286/JSR-168 Portlet Compatibility
6.19.1
Generic JSR 168 Compatibility Modifications
6.19.2
WebLogic Portal JSR 168 Compatibility Modifications
6.19.3
WebCenter JSR 168 Compatibility Modifications
6.20
Adding an Icon to a Java Portlet
7
Creating Clipper Portlets
7.1
Introduction
7.2
Creating a Clipper Portlet
7.3
Modifying Clipper Portlet Properties
7.3.1
Using the Properties Editor
7.3.2
Setting Clipper Properties Manually as Preferences
7.4
Modifying the Appearance of a Clipper Portlet
7.5
Authenticating a Clipper Portlet
7.5.1
Form-Based Authentication
7.5.2
Basic HTTP Authentication
7.6
Configuring URL Rewriting
7.6.1
Navigable Link Configurations
7.6.2
Resource URL Configurations
7.6.3
URL Rewriting Configuration Techniques
7.6.3.1
Implementing IClipperUrlFilter
7.6.3.2
Using Portlet Preferences
7.7
Clipper Portlets and HTTPS
7.8
Certificates and WebLogic Server
7.9
Refreshing the Original Clipper Portlet Page
7.10
Using Backing Files with Clipper Portlets
7.11
Updating Portlet Preferences While the Server is Running
7.12
Clipper Portlet Limitations
8
Working With JSF-Java Portlets
8.1
Overview
8.1.1
Supported Portlet Bridges
8.2
Creating Java 2.0-JSF 1.2 Portlets
8.3
JSR-286 and JSR-329 Architecture
8.4
Understanding WLP and JSF Rendering Life Cycles
8.4.1
WLP and JSF Life Cycles
8.4.2
Invocation Order of WLP and JSF Life Cycle Methods
8.5
Accessing WLP Context Objects from JSF Managed Beans
8.6
Understanding Scopes and JSF Portlets
8.6.1
Conceptual Scopes for Standard JSF Applications
8.6.1.1
JSF Standard Scopes
8.6.1.2
View Scope
8.6.1.3
Pageflow/Conversation Scope
8.6.2
Conceptual Scopes for Portal Applications
8.6.3
Implementation Patterns for Portal Scopes
8.6.4
Reinterpretation of the JSF Session and Request Scopes
8.6.5
Global Session and Portlet Group Session Scopes
8.7
State Sharing
8.7.1
State Sharing Concepts
8.7.2
State Sharing Patterns
8.7.2.1
HttpSession Versus HttpServletRequest
8.7.2.2
Single Portlet Pattern
8.7.2.3
Multiple Portlet Pattern
8.8
Using JSF in Java Portlets
8.8.1
Servlet Request And Servlet Response
8.8.2
PortletPreferences
8.8.3
PortletPresentationContext
8.8.4
Using JSPs in JSF Portlets
8.9
Converting Native JSF Portlets to Standard Java JSF Portlets
8.9.1
Backing Files
8.9.2
NamingContainer
8.9.3
Events
8.9.4
Preferences
8.9.5
Localization
8.9.6
Error Pages
8.9.7
Portlet Modes
8.9.8
ServletRequest/ServletResponse
8.10
Using Common WLP Features With JSF Portlets
8.10.1
Portlet Container Features
8.10.1.1
Portlet Modes
8.10.1.2
Portlet Error Page
8.10.1.3
Portlet Preferences
8.10.1.4
Portlet Dependencies
8.10.2
Portal Container Features and JSF Portlets
8.10.2.1
Locale Provider
8.10.2.2
Skeleton Files
8.10.3
Ajax Enablement
8.10.3.1
Partial Page Rendering Pattern
8.10.3.2
Stateless API Request Pattern
8.10.3.3
Portlet Aware API Request Pattern
8.11
Understanding Navigation Within a JSF Portlet
8.11.1
Navigating Within a Portlet with the JSF Controller
8.11.2
Support for Redirects
8.12
Interportlet Communication with JSF Portlets
8.13
Namespacing
8.13.1
Client ID Namespacing with the View Components
8.13.2
Client ID Namespacing with the WLP NamingContainer
8.13.3
Javascript Namespacing with Portlet Tag Library
8.14
Code Examples for Common Use Cases
8.14.1
Uploading Images
8.14.1.1
File Upload with HTML tags
8.14.1.2
File Upload with Tomahawk tags
8.14.2
Login/Logout Example
8.14.2.1
Login Portlet Design
8.14.2.2
Handling Redirects with JSR-286/JSR-329
8.14.2.3
Invalidating the Session with the JSR-329 Bridge
8.14.3
Login Portlet Implementation
8.14.3.1
JSF Login View
8.14.3.2
JSF Managed Backing Bean
8.14.3.3
Resource Bundle
8.14.3.4
Portlet Definition File
8.14.3.5
Redirect
8.14.4
Putting Login Portlet Into A Portal environment
8.15
Preparing JSF Portlets for Production
8.15.1
Configuration Tasks
8.15.1.1
Configuring URL Templates for Proxy Servers
8.15.1.2
JSF Portlets with WSRP
8.15.2
Handling Errors
8.15.3
Performance and Scalability
8.15.3.1
JSF Portlets in a Clustered Environment
8.15.3.2
Portlet Render Caching
8.15.4
Securing JSF Portlets
8.15.4.1
Deny Direct Access to the Portlet Views
8.15.4.2
Session Timeouts
8.15.5
Localizing JSF Portlets
8.15.5.1
Configuring the Localization
8.16
Third-Party Libraries
8.16.1
Facelets
8.16.2
Tomahawk
8.17
Tips for Logging, Iterative Development, and Debugging of JSF Portlets
8.17.1
Using Iterative Development for JSF Portlets
8.17.1.1
Testing Outside of the Portlet Container
8.17.1.2
Using Application Republish
8.17.1.3
HttpSession Caching
8.17.1.4
Handling OutOfMemory Errors
8.17.2
Debugging
8.17.2.1
Attaching Source (Step 1)
8.17.2.2
Suggested JSF Framework Break Points (Step 2)
8.18
Appendix: JSFJavaPortletHelper
9
Developing Portlets
9.1
Portlet Properties
9.1.1
Editing Portlet Properties
9.1.2
Tips for Using the Properties View
9.1.3
Portlet Properties in the Portal Properties View
9.1.4
Portlet Properties in the Portlet Properties View
9.2
Portlet Preferences
9.2.1
Specifying Portlet Preferences
9.2.1.1
Specifying Preferences for Java Portlets in the Deployment Descriptor
9.2.1.2
Specifying Preferences for Other Types of Portlets using Oracle Enterprise Pack for Eclipse
9.2.1.3
Configuring Portlet Preference Deployment Options
9.2.2
Using the Preferences API to Access or Modify Preferences
9.2.2.1
Getting Preferences Using the Preferences API
9.2.2.2
Setting Preferences Using the Preferences API
9.2.2.3
Getting and Setting Preferences for Java Portlets Using the Preferences API
9.2.2.4
Getting and Setting Portlet Preferences Using the API for Other Portlet Types
9.2.2.5
JSP Tags for Getting Portlet Preferences
9.2.3
Portlet Preferences SPI
9.2.3.1
Implement the SPI
9.2.3.2
Using the SPI
9.2.4
Best Practices in Using Portlet Preferences
9.2.4.1
Desktop Testing of Portlet Preferences
9.2.4.2
Users Must be Authenticated
9.2.4.3
Do Not Store Arbitrary Data as Preferences
9.2.4.4
Do Not Use Instance IDs Instead of Preferences
9.3
Using Shared Parameters
9.3.1
Setting Shared Parameters
9.3.2
Accessing Shared Parameters
9.3.3
Persistence of Shared Parameters
9.3.4
Creating Shared Parameters
9.4
Backing Files
9.4.1
How Backing Files are Executed
9.4.2
Thread Safety and Backing Files
9.4.3
Scoping and Backing Files
9.4.4
Backing File Guidelines
9.4.4.1
Adding a Backing File Using Oracle Enterprise Pack for Eclipse
9.4.4.2
Adding the Backing File Directly to the .portlet File
9.5
Portlet Appearance and Features
9.5.1
Portlet Dependencies
9.5.1.1
Introduction
9.5.1.2
Identifying Portlet Dependencies
9.5.1.3
Creating, Editing, and Adding a Dependency File
9.5.1.4
Example Dependency Files
9.5.1.5
Considerations and Limitations
9.5.1.6
Scoping JavaScript Variables and CSS Styles
9.5.1.7
Rewriting Resource URLs
9.5.2
Portlet Modes
9.5.2.1
Adding or Removing a Mode for an Existing Portlet
9.5.2.2
Properties Related to Portlet Modes
9.5.3
Creating Custom Modes
9.5.4
Custom Mode Properties
9.5.5
Portlet States
9.5.5.1
Modifying Portlet States in Oracle Enterprise Pack for Eclipse
9.5.5.2
Minimizing or Maximizing a Portlet Programmatically
9.5.6
Portlet Title Bar Icons
9.5.7
Portlet Height and Scrolling
9.5.7.1
Making All Portlets Scroll
9.6
Getting Request Data in Page Flow Portlets
9.7
JSP Tags and Controls in Portlets
9.7.1
Viewing Available JSP Tags
9.7.2
Viewing Available Controls
9.8
Portlet State Persistence
9.9
Advanced Portlet Development with Tag Libraries
9.9.1
Adding ActiveMenus
9.9.1.1
Configuring the ActiveMenus Tag
9.9.1.2
Using the ActiveMenus Tag
9.9.2
Enabling Placeable Movement
9.9.2.1
Using the DragDrop Tags
9.9.3
Enabling Dynamic Content
9.9.3.1
Understanding the DynamicContent Tags
9.9.3.2
Using the DynamicContent Tags
9.9.4
Using the User Picker
9.9.4.1
Using the UserPicker Tags
9.10
Detached Portlets
9.10.1
Considerations for Using Detached Portlets
9.10.2
Building Detached Portlets
9.11
Working with Inlined Portlets
9.11.1
Extracting Inlined Portlets
9.11.2
Setting the Theme of an Inlined Portlet
9.12
Extracting Books and Pages
9.13
Avoiding Committing Responses
10
Optimizing Portlet Performance
10.1
Performance-Related Portlet Properties
10.2
Portlet Caching
10.3
Remote Portlets
10.4
Portlet Forking
10.4.1
Configuring Portlets for Forking
10.4.2
Architectural Details of Forked Portlets
10.4.2.1
Understanding Request Latency and the Portal Life Cycle
10.4.2.2
Queuing and Dispatching Forked Portlets for Processing
10.4.2.3
Threading Details and Coordination
10.4.2.4
Forking Versus Asynchronous Rendering
10.4.3
Best Practices for Developing Forked Portlets
10.4.3.1
Consider Thread Safety
10.4.3.2
Consider the Runtime Environment for Forked Portlets
10.4.3.3
Use Caution with Interportlet Communication and Forked Portlets
10.5
Asynchronous Portlet Content Rendering
10.5.1
Implementing Asynchronous Portlet Content Rendering
10.5.2
Thread Safety and Asynchronous Rendering
10.5.3
Considerations for IFRAME-based Asynchronous Rendering
10.5.4
Considerations for AJAX-based Asynchronous Rendering
10.5.5
Comparison of IFRAME- and AJAX-based Asynchronous Rendering
10.5.6
Comparison of Asynchronous and Conventional or Forked Rendering
10.5.7
Portal Life Cycle Considerations with Asynchronous Content Rendering
10.5.8
Asynchronous Content Rendering and IPC
10.5.8.1
File Upload Forms
10.5.8.2
Disabling Asynchronous Rendering for a Single Interaction
10.5.8.3
URL Compression
11
Monitoring and Determining Portlet Performance
11.1
Introduction
11.2
Use Case
11.3
Detecting a Misbehaving Portlet
11.4
Disabling the Bad Portlet and Enabling an Alternative Portlet
12
Configuring Local Interportlet Communication
12.1
Introduction
12.2
Overview of Interportlet Communication Techniques
12.3
Differences Between Portal Events and Java Portlet Events
12.4
Portlet Event Handling
12.4.1
Event Handlers
12.4.1.1
Generic Event Handlers
12.4.2
Event Actions
12.4.3
Event Types
12.5
Using the Portlet Event Handlers Wizard
12.5.1
Opening the Portlet Event Handlers Wizard
12.5.2
Portlet Event Handlers Wizard - Add Handler Field Descriptions
12.5.3
Portlet Event Handlers Wizard - Add Action Field Descriptions
12.5.4
Definition Labels and Interportlet Communication
12.6
Custom Event Handling
12.7
Events in Java Portlets
12.7.1
Overview
12.7.2
Adding a Processing Event
12.7.3
Adding a Publishing Event
12.7.4
Modifying a Java Portlet Event
12.7.5
Deleting a Java Portlet Event
12.8
Subscribing Java Portlets to Portal Framework Events
12.8.1
Custom Event Namespaces
12.8.2
Local Name for Notification Events
12.9
Public Render Parameters
12.10
Shared Parameters
12.11
IPC Special Considerations and Limitations
12.11.1
Using Asynchronous Portlet Rendering with IPC
12.11.2
Consistency of the Listen To Field
12.12
About QNames and Aliases
12.12.1
QNames and Aliases in Events
12.12.2
QNames and Aliases in Shared Parameters / Public Render Parameters
13
Interportlet Communication Example With Event Handling
13.1
Before You Begin – Environment Setup
13.2
Basic IPC Example
13.2.1
Create the Portlets
13.2.1.1
Create the JSP Files and Portlets
13.2.2
Create the Backing File
13.2.3
Attach the Backing File
13.2.4
Add the Event Handler to bPortlet
13.2.5
Test the Project
13.2.6
Summary
14
Adding the Content Presenter Portlet
14.1
Using the Content Presenter Example
14.1.1
Starting the Content Presenter Example
14.1.2
Performing Inline Editing in the Content Presenter Example
14.1.2.1
Entering Inline Edits
14.1.2.2
Enabling Inline Editing for the Training Announcement Portlet
14.1.3
Enabling Inline Editing in Your Portlets
14.2
Configuring the Content Presenter Portlet in Your Portal
14.2.1
Configuring the Content Presenter Portlet
14.2.1.1
Changing How Much Content Appears in the Portlet
14.2.1.2
Using Portlet Publishing to Expose a Content Presenter Portlet
15
Adding a Third-Party Portlet
15.1
Using the Collaboration Portlets
15.2
Autonomy Portlets
15.3
Documentum Portlets
15.4
MobileAware Portlets
16
Using the Collaboration Portlets
16.1
What Are Collaboration Portlets
16.2
Adding Collaboration Portlets to Your Portal
16.2.1
Step 1: Add Collaboration Facets
16.2.2
Step 2: Add Collaboration Repository to Your Domain
16.2.3
Step 3: Create a Role for Collaboration Portlet Users
16.2.4
Step 4. (Optional) Configure a Repository
16.2.5
Step 5. Entitle the Collaboration Data Repository
16.2.6
Step 6. Add Users to the New Role
16.2.7
Step 7. Configure the Collaboration Portlets
16.2.8
Step 8. Add Collaboration Portlets to Your Desktop
16.3
Configuring Collaboration Portlets for a Shared View
16.3.1
Overview of User and Common Area Portlets
16.3.2
Configuring a Common Area Portlet
16.4
Using the Collaboration Portlet Source Code
16.4.1
Copying the Source Code to Your Project
16.4.2
Source Code Disclaimers
16.5
Using the Calendar Portlet
16.5.1
Adding a Calendar Appointment
16.5.2
Managing Your Calendar
16.6
Using the Mail Portlet
16.6.1
Configuring the Mail Portlet
16.6.1.1
Removing a Mail Account
16.6.2
Sending E-Mail
16.6.3
Viewing Mail
16.6.4
Managing Mail
16.6.5
Searching Mail
16.7
Using the Contacts Portlet
16.7.1
Adding a Contact
16.7.2
Filtering and Navigating Contacts
16.7.3
Managing Contacts
16.7.4
Searching Contacts
16.8
Using the Tasks Portlet
16.8.1
Adding a Task
16.8.2
Managing Tasks
16.9
Using the Discussion Forums Portlet
16.9.1
Adding a Category and a Discussion Forum
16.9.2
Adding a Discussion Topic
16.9.3
Replying to a Discussion Topic
16.9.4
Managing Discussion Forums
16.10
Setting Up the Rich Text Editor
16.10.1
Enabling Rich Text Editing
16.10.1.1
Modifying Portlet Preferences for Rich Text Editing
Part III Staging
17
Assembling Portlets into Desktops
17.1
Portlet Library
17.2
Managing Portlets Using the Administration Console
17.2.1
Copying a Portlet in the Library
17.2.2
Modifying Library Portlet Properties
17.2.3
Modifying Desktop Portlet Properties
17.2.4
Deleting a Portlet
17.2.5
Managing Portlets on Pages
17.2.5.1
Adding Portlets to a Page
17.2.5.2
Positioning Elements on a Page
17.2.6
Overview of Portlet Categories
17.2.6.1
Creating a Portlet Category
17.2.6.2
Modifying Portlet Category Properties
17.2.6.3
Adding Portlets to a Portlet Category
17.2.7
Overview of Portlet Preferences
17.2.8
Creating a Portlet Preference
17.2.9
Editing a Portlet Preference
17.2.10
Overview of Delegated Administration
17.2.11
Overview of Visitor Entitlements
18
Deploying Portlets
18.1
Deploying Portlets
Part IV Production
19
Managing Portlets in Production
19.1
Pushing Changes from the Library into Production
19.2
Transferring Changes from Production Back to Development
A
Oracle Enterprise Pack for Eclipse Portlet Database Data
A.1
Database Structure for Portlet Data
A.1.1
Removing Portlets from Production
A.2
Portlet Resources in the Database
A.2.1
Types of Database Tables
A.2.2
Management of Portlet Data
A.2.3
How the Database Shows Removed Portlets