../E63259-01.epub /> ../E63259-01.mobi />

15 Creating Pages and Adding Resources

This chapter describes how to create pages in your Portal Framework applications. It also discusses the different resources you can add to those pages to build up the content of your application.

This chapter includes the following topics:

15.1 Introduction to Pages

Pages are the fundamental building blocks of a Portal Framework application. You use the pages in a Portal Framework application to expose the different kinds of content you want to provide to your users. For more information, see Section 5.3.2, "Understanding Pages, Page Templates and Styles, and the Portal Page Hierarchy."

Pages can include content from various resources, such as:

  • Portlets and pagelets

  • WebCenter Portal task flows and custom task flows

  • Content from UCM

  • External applications

  • Data controls

Adding content to the pages in your application is no different from adding content to any other web application.

15.2 Creating Pages in a WebCenter Portal Framework Application

The WebCenter Portal Framework Application template populates a new Portal Framework application with several default pages. You must add your own pages to develop your application beyond this initial framework.

Note:

Always create Portal Framework application pages in JDeveloper as JSP documents (JSPX files) rather than JSP pages (JSP files). For page customizations to be stored, the page must be represented in XML. By choosing to create an XML representation of the JSP document, you ensure that customizations are always possible for the Portal Framework application page.
  1. In the Application Navigator, right-click the pages folder (/oracle/webcenter/portalapp/pages) in your application project and choose New.

    Tip:

    For pages to be used in the page hierarchy, they must be located under oracle/webcenter/portalapp. For more information, see Section 5.3.2, "Understanding Pages, Page Templates and Styles, and the Portal Page Hierarchy."
  2. In the New Gallery, expand Web Tier, select JSF and then JSF Page, and click OK.

  3. In the Create JSF Page dialog (Figure 15-1), in the File Name field, enter a file name for the page.

    Figure 15-1 The Create JSF Page Dialog

    Description of Figure 15-1 follows
    Description of "Figure 15-1 The Create JSF Page Dialog"

  4. Select Create as XML Document (*.jspx).

  5. In the Initial Page Layout and Content section, select Page Template and select the page template that you want to use to define the layout and structure of the page. For more information on page templates, see Chapter 11, "Developing Page Templates."

    After you have created the page, you can edit the code to enable dynamic selection of the page template. For more information, see Section 11.4.3, "How to Enable Dynamic Switching of Page Templates at Runtime."

  6. Click OK.

For information about the other settings in this dialog that are not specific to Portal Framework application pages, see the "Creating a View Page" section in Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

For information about how to add general components, such as layout components, to the page, see the "How to Add ADF Faces Components to JSF Pages" section in Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

To enable users to edit your application's pages at runtime, you must add Composer components to it. For more information, see Chapter 18, "Enabling Runtime Editing of Pages Using Composer."

15.3 Adding WebCenter Portal Tools and Services Task Flows to a Page

WebCenter Portal tools and services enrich applications with enterprise 2.0 capabilities, including social computing services, personal productivity services, online awareness and communications, content integration, and web analytics. WebCenter Portal tools and services expose their functionality through task flows. For more information about WebCenter Portal tools and services, see Chapter 4, "Preparing Your Application for WebCenter Portal Tools and Services."

If you create your application using the WebCenter Portal Framework Application template, all the appropriate WebCenter Portal tools and services connection wizards and tag libraries are readily visible and available in the New Gallery and Component Palette. When you consume a WebCenter Portal tools and services task flow or component, the necessary libraries are automatically added to the project. Depending on the tool or service you plan to consume, your application must meet certain prerequisites. For example, if the service must know the identity of users, then your application must provide some level of security with user authentication. For more information, see Chapter 4, "Preparing Your Application for WebCenter Portal Tools and Services."

For more information about the individual WebCenter Portal tools and services and their task flows, see Table 15-1.

Note:

If the WebCenter Portal tools and services task flows do not quite meet your requirements, you can customize them to change their look and feel or functionality. For example, you can add text, change labels, remove regions or components, or show additional attributes. For more information, see Chapter 23, "Customizing WebCenter Portal Tools and Services Task Flows."

15.4 Adding Custom Task Flows to a Page

Task flows, like pages, are containers in which you can add components such as portlets, content, and other task flows. You can add task flows to pages or other task flows. Task flows created in JDeveloper can be included in resource catalogs so that users can add them to pages or other task flows at runtime.

You can drag and drop a custom task flow into a resource catalog so that it is available for users to add to pages or task flows at runtime. For more information, see Section 14.3.2, "How to Drag and Drop a Resource into a Resource Catalog." When you deploy the application, the task flow is also deployed to the target instance.

For detailed information about creating different types of ADF task flows, see the "Creating ADF Task Flows" part in Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

You cannot directly upload a task flow created in and exported from JDeveloper into an already deployed application, but you can import a task flow created at runtime into JDeveloper, modify it, and export it back to the deployed application.

Exposing Task Flows Created in JDeveloper to a Deployed Application

If you create a custom task flow in JDeveloper and want to expose it in an already deployed application, you must deploy the project containing the task flow as an ADF shared library to the runtime application. Once the library containing the task flow is accessible to the application, it is included in the runtime Resource Registry and can be added to custom resource catalogs from there.

Note:

Permissions to view or edit a task flow are not provisioned by default when you create the task flow. To ensure that a task flow is visible at runtime, prior to deploying as a shared library, you must grant at least the View privilege on the task flow. For more information, see Section 22.6.1, "Granting Permissions on Task Flows."

For the steps to deploy an application to a Portal Framework application as a shared library, see the "Deploying the Application to a WebLogic Managed Server" section in Oracle Fusion Middleware Administering Oracle WebCenter Portal. However, while running the Install Application Assistant, on the Choose targeting style page, select Install this deployment as a library.

For the steps to deploy an application to a WebCenter Portal instance, see Section 55.2.5, "Deploying Extensions to the WebCenter Portal Shared Library (extend.spaces.webapp.war)."

15.5 Adding Content from Content Server to a Page

To provide access to the content in your Content Server content repository, you must create a connection to the Content Server. For more information, see Section 25.2.1, "Creating a Content Repository Connection Based on the Oracle Content Server Adapter."

With a connection to Content Server established, you can provider users with a user-friendly interface to manage, display, and search documents at runtime. For more information, see Chapter 28, "Integrating Documents."

Next, add one of the content task flows or document components to your page to expose the content from Content Server. Content task flows include Content Presenter and the documents task flows:

  • Content Presenter

  • Document Explorer

  • Document List Viewer

  • Document Manager

  • Document Navigator

  • Folder Viewer

  • Recent Documents

  • Document Viewer

  • Document Mini Properties

  • Document Properties

  • Rich Text Editor

  • Document Upload

  • Document Version History

  • AutoVue

Document components include:

  • Document Link

  • Document Inline Frame

  • Document Image

For more information about the Content Presenter task flow, see Section 29.1, "Understanding the Content Presenter Task Flow." For more information about the documents task flows, see Section 29.2, "Understanding the Documents Task Flows." For more information about document components, see Section 29.3, "Understanding Document Components."

If you use the Content Presenter task flow, you may also want to create your own Content Presenter display templates. Content Presenter display templates define how content repository items should be rendered on a page. For more information, see Chapter 27, "Creating Content Presenter Display Templates."

15.6 Adding Portlets to a Page

A portlet is a reusable web component that can draw content from many different sources. Portlets provide a way of presenting data from multiple sources in a meaningful and related way. For more information about portlets, see Chapter 57, "Introduction to Portlets."

To add a portlet to your application, you must first register the portlet's producer with the Portal Framework application. For more information, see Section 63.2, "Registering Portlet Producers with a WebCenter Portal Framework Application."

After you have registered the portlet producer, you can then drag and drop any portlets that you want to include in your application onto the appropriate page. For more information, see Section 63.5, "Adding Portlets to a Page."

15.7 Adding Pagelets to a Page

A pagelet is similar to a portlet, but while portlets were designed specifically for portals, pagelets can be run on any web page, including within a portal or other web application. Pagelets can be used to expose platform-specific portlets in other web environments.

For more information about adding pagelets to your pages, see Section 62.7, "Using Pagelets in Web Applications."

15.8 Adding Data Controls to a Page

Data controls are used to retrieve information from different data sources and create user interface (UI) components within your Portal Framework application. A data control provides you with easy-to-use methods that you can drag and drop onto JSF pages to publish content as ADF components, such as URLs, files, and folders. To add content from a data source to a JSF page, you must first create a connection to the data source, then use the connection to create a data control based on the repository.

You can create custom data controls to connect to different data sources and add them to your application pages or task flows. For detailed information about data controls, see the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

You cannot directly upload a data control created in and exported from JDeveloper into an already deployed application. Neither can you import a data control created at runtime into JDeveloper.

Some WebCenter Portal tools and services provide data controls for creating customized visualizations of the tool or service. For information about consuming these data controls in your application, see Section 4.1.3, "Using WebCenter Portal Data Controls."

Exposing Data Controls for Consumption in an Already Deployed Application

The runtime Resource Registry in a Portal Framework application contains a Design Time Data Controls folder by default. This folder exposes the seeded WebCenter Portal tools and services data controls and any other data controls that were added to the application before it was deployed. To expose a new data control in an already deployed Portal Framework application, you must deploy the project containing the data control as an ADF shared library to the runtime application. Once the library containing the data control is accessible to the application, it is displayed in the runtime Resource Registry and can be added to custom resource catalogs from there.

For the steps to deploy an application to a Portal Framework application as a shared library, see the "Deploying Applications Using the WLS Administration Console" section in Oracle Fusion Middleware Administering Oracle WebCenter Portal. However, while running the Install Application Assistant, on the Choose targeting style page, select Install this deployment as a library.

For the steps to deploy an application to a WebCenter Portal instance, see Section 55.2.5, "Deploying Extensions to the WebCenter Portal Shared Library (extend.spaces.webapp.war)."

15.9 Using External Applications

If the resources you add to your pages require access to applications that define their own authentication processes, you can add external applications to replicate a single sign-on experience for users.

For example, your page might include portlets that point to applications that require a separate login. Or, if your page includes the Mail task flow, you must identify an external application to map the mail server user to the application user so that the user does not have to log in separately every time.

The first time a user accesses the external application, he or she is prompted for a user name and password for the external application. These credentials are then mapped to the user and stored securely in a credential store. The credential store subsequently supplies these credentials during authentication to the external application. Unless the external application's credentials change, the user supplies the credentials only once as the mapped information is read from the credential store for future requests.

For more information, see Section 74.13, "Working with External Applications."