Skip Headers
Oracle® Fusion Middleware Federated Portals Guide for Oracle WebLogic Portal
10g Release 3 (10.3.2)

Part Number E14235-02
Go to Documentation Home
Home
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

6 Offering Books, Pages, and Portlets to Consumers

WebLogic Portal producer applications can offer books, pages, and portlets to consumers. This chapter explains the procedures and best practices involved in making books, pages, and portlets remoteable.

Tip:

In this chapter, we use the term remoteable to refer to a book, page, or portlet that is deployed in a producer application. To be remoteable, the Offer As Remote property of the book, page, or portlet must be set to true, as explained in later in this chapter.

This chapter includes these sections:

6.1 Introduction

A complex producer can offer remoteable books, pages, and portlets. When a page or book is offered as remote from a complex producer application, the nested contents of the page or book are, by default, also offered as remote. This means that you can group multiple portlets in a page, for example, and a WebLogic Portal consumer can then consume both the page and its portlets in one operation.

Tip:

Portlets deployed in a simple application can also be remoteable; however, only complex producers can offer remoteable books and pages. See Chapter 8, "Configuring a WebLogic Server Producer" for more information on creating remoteable portlets in a WebLogic Server application. For information on simple and complex producers, see Section 3.4, "Understanding Producers and Consumers".

Table 6-2 summarizes which Oracle tools you can use to create and consume remote books, pages, and portlets. Although you can consume remote portlets using Oracle Enterprise Pack for Eclipse, you cannot consume remote books and pages. Oracle Enterprise Pack for Eclipse does not provide a feature for locating and consuming remote books and pages. If you want to incorporate remote books and pages into a WebLogic Portal consumer application, you must use the WebLogic Portal Administration Console, see Chapter 18, "Adding Remote Resources to the Library."

Table 6-1 List of Oracle Tools for Creating and Consuming Remote Resources

Feature Oracle Enterprise Pack for Eclipse
Administration Console

Create remoteable books and pages

Yes

No

Create remoteable portlets

Yes

No

Consume remote portlets

Yes

Yes

Consume remote books and pages

No

Yes


6.2 Offering Portlets on a Producer

By default, all portlets deployed in a WebLogic Portal producer application are available to consumers as remote portlets. You can, however, specify which portlets are actually available to consumers by setting the Offer As Remote property in the Properties view for the portlet, as shown in Figure 6-6.

If you want a portlet to be available to consumers, set Offer As Remote to true (the default). If you want to hide a portlet from consumers, set Offer As Remote to false.

Figure 6-1 Portlet Properties View

Description of Figure 6-1 follows
Description of "Figure 6-1 Portlet Properties View"

For detailed information on creating portlets and setting properties, see the Oracle Fusion Middleware Portlet Development Guide for Oracle WebLogic Portal.

6.3 Offering Books and Pages on a Producer

If you want to create books and pages that are accessible to remote consumer applications, you must use Oracle Enterprise Pack for Eclipse.

To make a remoteable book or page in Oracle Enterprise Pack for Eclipse, as the following procedures explain, you must create the book or page as a standalone .book or .page file. In Oracle Enterprise Pack for Eclipse, you can do this by selecting New > File > Other > WebLogic Portal > Book (or Page).

Tip:

For more information on creating and working with pages and books, see the Oracle Fusion Middleware Portal Development Guide for Oracle WebLogic Portal.

This section includes these topics:

6.3.1 Setting Up the Example

If you want to try the example discussed in this section, you need to run Oracle Enterprise Pack for Eclipse and perform the prerequisite tasks outlined in this section.

To set up the example environment, perform the prerequisite tasks outlined in Table 6-2. If you are not familiar with the specific procedures for these tasks, they are described in detail in the Oracle Fusion Middleware Tutorials for Oracle WebLogic Portal.

Table 6-2 Prerequisite Tasks

Task Recommended Name

Create a WebLogic Portal domain.

producerPortalDomain

Create a Portal EAR Project.

producerEAR

Create an Oracle WebLogic Server v10.x.

N/A

Associate the EAR project with the server.

N/A

Create a Portal Web Project and add it to the EAR.

producerWebProject

Figure 6-2 shows the Package Explorer after the prerequisite tasks have been completed.

Figure 6-2 Package Explorer After Prerequisite Tasks are Completed

Description of Figure 6-2 follows
Description of "Figure 6-2 Package Explorer After Prerequisite Tasks are Completed"

6.3.2 Creating a Remoteable Page (or Book)

Tip:

The procedure for creating a remoteable book is almost identical to the procedure for creating a page. Rather than reproduce both procedures here, we explain how to create a remoteable page and, where appropriate, highlight any differences between the two procedures.

To create a page in a producer application that is accessible to consumer applications:

  1. Start Oracle Enterprise Pack for Eclipse.

  2. Create a Portal Web Project, as explained in the previous section.

  3. Select File > New > Other.

  4. In the New – Select a wizard dialog, open the WebLogic Portal folder, select Page, and click Next.

    Tip:

    To create a remoteable book, select Book instead of Page.
  5. In the New Page dialog, select a parent folder for the new page and enter a name for the page, as shown in Figure 6-3. In this example, the parent folder is WebContent, and the filename is myPage.page.

    Figure 6-3 New Page Dialog

    Description of Figure 6-3 follows
    Description of "Figure 6-3 New Page Dialog"

  6. Click Finish.

    Checkpoint: The file myPage.page is added to the Portal Web Project in the folder you specified, as shown in Figure 6-4.

    In addition, the page opens in the editor, as shown in Figure 6-5.

    Figure 6-5 Page File Displayed in the Editor

    Description of Figure 6-5 follows
    Description of "Figure 6-5 Page File Displayed in the Editor"

  7. Click on the border of the page to display the page's Properties view. If the Properties view is not currently available, select Window > Show View > Properties.

  8. Note that, by default, the Offer As Remote property is set to true for this .page file, as shown in Figure 6-6. This property setting means that this page, and any books, pages, and portlets you add to it (according to the rules discussed in Section 6.4, "Rules for Creating Remoteable Books and Pages") will be visible to consumers if their respective Offer As Remote properties are also set to true.

    Figure 6-6 Offer As Remote Property

    Description of Figure 6-6 follows
    Description of "Figure 6-6 Offer As Remote Property "

6.3.3 Summary

You can treat the page shown in Figure 6-5 like any other page. You can add books and portlets to it and you can drag and drop the page into a portal. If you create a remote book, you can add pages to it, and those pages can in turn contain portlets and other books.

6.4 Rules for Creating Remoteable Books and Pages

The key points to remember with respect to making a page (or book) accessible to remote consumers are:

Figure 6-7 Sample Configuration

Description of Figure 6-7 follows
Description of "Figure 6-7 Sample Configuration"

Figure 6-8 shows another sample configuration. In this case, Book_1 is offered as remote; however, it is not visible to consumers. This is because none of its contents are offered as remote. Page_1 is not offered as remote explicitly and Page_2 is not offered as remote because it is empty (even though its property is set to true).

Figure 6-8 Sample Configuration

Description of Figure 6-8 follows
Description of "Figure 6-8 Sample Configuration "