Federated Portals Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

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:

 


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 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 Understanding Producers and Consumers.

Table 6-1 summarizes which Oracle tools you can use to create and consume remote books, pages, and portlets. Although you can consume remote portlets using Workshop for WebLogic, you cannot consume remote books and pages. Workshop for WebLogic 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 Adding Remote Resources to the Library.

Table 6-1 List of Oracle Tools for Creating and Consuming Remote Resources
Feature
Workshop for WebLogic
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

 


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

Portlet Properties View

For detailed information on creating portlets and setting properties, see the Portlet Development Guide.

 


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 Workshop for WebLogic.

To make a remoteable book or page in Workshop for WebLogic, as the following procedures explain, you must create the book or page as a standalone .book or .page file. In Workshop for WebLogic, 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 Portal Development Guide.

This section includes these topics:

Setting Up the Example

If you want to try the example discussed in this section, you need to run Workshop for WebLogic 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 WebLogic Portal tutorial “Setting Up Your Portal Development Environment.”

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

Package Explorer After Prerequisite Tasks are Completed

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 Workshop for WebLogic.
  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.
  5. Tip: To create a remoteable book, select Book instead of Page.
  6. 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.
  7. Figure 6-3 New Page Dialog


    New Page Dialog

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

    Figure 6-4 A New Page File


    A New Page File

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

    Figure 6-5 Page File Displayed in the Editor


    Page File Displayed in the Editor

  10. 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.
  11. 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 Rules for Creating Remoteable Books and Pages) will be visible to consumers if their respective Offer As Remote properties are also set to true.
  12. Figure 6-6 Offer As Remote Property


    Offer As Remote Property

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.

 


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:


  Back to Top       Previous  Next