15.1 Overview

 < Day Day Up > 

During portlet development using the Portal V5 Toolkit, you can preview a portlet application running on WebSphere Portal on a local or remote machine. When you want to preview a portlet application that you have already developed or modified, select the provided Portlet Preview function.

In this environment, you do not have to send the rebuilt WAR file to the target runtime portal, or launch the browser. The Portlet Preview option automatically executes these tasks for you when you invoke this function. The Portlet Preview option also uninstalls and re- installs the portlet application for you by using the portal's XML configuration interface.

The development workstation and the remote Portal are shown in Figure 15-1.

Figure 15-1. Development workstation

graphics/15fig01.gif

Note : The Portlet Preview is a different function from the preview page function which shows how a current page is likely to look when viewed with Microsoft Internet Explorer.

To preview a portlet, you need WebSphere Portal 5.0 or 4.2 externally running on a remote machine, your machine is already set with this scenario.The Portlet Preview does not support WebSphere Portal installed as the test environment. Instead, you can use Run on Server in the test environment to run the portlet easily; this is similar to the Portlet Preview method.

Multiple users can preview portlets since normal HTTP communication channel to a portal is used, and a single WebSphere Portal can support multiple users of the Portlet Preview. A preview page is generated for every user. Every user must use his/her own user ID.

The Portlet Preview action automatically executes the following tasks for you:

  • Builds a selected portlet project.

  • Exports it as a WAR file.

  • Creates a preview place unless it already exists. The name is defined in the Portlet Preview preference.

  • Creates a preview page for the user. The name is the same as the user ID.

  • Installs or updates the portlet application into WebSphere Portal.

  • Adds the portlet application to the preview page and activates the page.

  • Sets the edit permission for the user.

  • Launches a browser.

  • Logs in to the portal server as the preview user and locates the preview page.

Temporary resources and configurations are generated when previewing a portlet. After previewing, you can delete them by executing the Reset Portlet Preview action, which automatically executes the following tasks for you.

  • Deletes all portlet applications deployed by the user invoking the reset Portlet Preview function.

  • Deletes the preview page.

Note : You need to delete the preview place (Portal V4.x) manually using Portal Administration.

15.1.1 Portlet Preview buttons available in the toolbar

Optionally, you may want to have the Preview Portlet and Reset Preview Portlet buttons available in the toolbar (see Figure 15-4 on page 467). If you want this option and it is not available, follow these steps to add them to the toolbar:

  1. Select Window -> Customize Perspective .

    Figure 15-2. Customize portlet perspective

    graphics/15fig02.jpg

  2. Select Other and check the Preview Portlet box to display items in the portlet perspective. Click OK .

    Figure 15-3. Customize Perspective - Other - Preview Portlet

    graphics/15fig03.gif

  3. Select the Preview Portlet drop-down list.

    Figure 15-4. Preview Portlet available options

    graphics/15fig04.jpg

 < Day Day Up > 


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net