Samples Guide

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

The Dynamic Visitor Tools Sample

The Dynamic Visitor Tools (DVT) sample application uses and demonstrates certain WLP and external client-side development technologies. The primary purpose of the DVT sample application is to highlight the possibilities of client-side portal development.

Note: The DVT Sample is not supported for a production environment. The DVT sample is intended to illustrate how the WLP client-side development technologies such as the REST and Disc APIs and the external Dojo toolkit, can be used to enhance a portal’s interactivity.

This chapter includes these topics:

 


What is the DVT Sample Application?

The Dynamic Visitor Tools (DVT) sample application demonstrates highly interactive tools for customizing the appearance, behavior, and content of WebLogic Portal applications. These sample tools use WLP features such as the Disc APIs and the REST API to enhance the user’s experience through highly interactive user interfaces, in-place editing of certain text elements, such as titles, and faster browser refresh times. See the Client-Side Developer’s Guide for detailed information on Disc and REST.

To experience the DVT, you can:

Note: As stated previously, the DVT sample application is only provided for demonstration purposes. The DVT sample is not intended to be used in a production environment.

 


Installing the Portal Examples

Before you can use any WLP sample application, the Portal Examples feature must be installed. This feature adds the available WLP sample applications and the sample domain to your installation. Portal Examples are not installed by default.

Install the Portal Examples using the Oracle WebLogic Portal Installer. You can install the examples into a new installation or into an existing installation by following these steps:

  1. Run the Oracle WebLogic Portal Installer and choose to perform a Custom Installation.
  2. In the Choose Products and Components dialog, select Portal Examples.
  3. Use the wizard to complete the installation.

 


Running the Pre-configured DVT Sample Application

WebLogic Portal provides a DVT sample application that is pre-configured and ready to run. The DVT sample application lets you experience the DVT without having to use the development or administration tools. This section explains how to start the DVT sample application.

Note: The Dynamic Visitor Tools (DVT) feature is a sample WLP application that uses certain WLP and external client-side development technologies. The DVT Sample is not supported for a production environment.

To run the pre-configured DVT sample application on a Windows system:

  1. Select Start > All Programs > Oracle Products > WebLogic Portal > Examples > Start Example Server.
  2. After the server starts, select Start > All Programs > Oracle Products > WebLogic Portal > Examples > Visit Portal Examples. The WebLogic Portal Sample Domain web page appears.
  3. In the samples web page, click Go to the Dynamic Visitor Tools demo to open the sample application in your browser.

 


Enabling the DVT for a Desktop

This section explains how to enable the DVT for any portal desktop. This section includes these basic steps:

  1. Adding the DVT Facet
  2. Configuring Dynamic Visitor Tools in Workshop for WebLogic
  3. Enabling Dynamic Visitor Tools for a Streaming Desktop
  4. Testing the DVT
Tip: You can also use a cheat sheet in Workshop for WebLogic to guide you through this procedure. To open the cheat sheet, select Help > Cheat Sheets > Oracle WebLogic Portal > Create a Dynamic Visitor Tools Enabled Desktop.

Adding the DVT Facet

You must add Dynamic Visitor Tools Sample facet to the web project that you wish to enable for DVT.

Note: You must install the Portal Examples before you perform these steps. See Installing the Portal Examples.

To do this:

  1. Right click the Portal Web Project and select Properties.
  2. In the Properties dialog, select Project Facets and then Add/Remove Project Facets.
  3. In the Add/Remove Facets dialog, select WebLogic Portal Samples > Dynamic Visitor Tools Sample, as shown in Figure 2-1.
  4. Figure 2-1 Selecting the DVT Facet


    Selecting the DVT Facet

For more information on adding facets, see “Adding Facets to an Existing Project” in the Portal Developer’s Guide.

Configuring Dynamic Visitor Tools in Workshop for WebLogic

To configure a DVT-enabled portal in Workshop for WebLogic:

  1. In Workshop for WebLogic, open a portal (.portal file) in the Portal editor.
  2. Be sure the Properties editor is open for the portal. Select Window > Show View > Properties to open it.
  3. Click the desktop border, as shown in Figure 2-2.
  4. Figure 2-2 Selecting the Desktop Border


    Selecting the Desktop Border

  5. In the Properties editor, set the following properties (see Figure 2-3):
  6. Asynchronous Mode to enabled.

    DVT Enabled to true. Note that the Disc Enabled field is automatically set to true after this selection. This flag enables the dynamic features supported by the WLP framework.

    Shell to DVT Header-Footer Shell. This setting enables the DVT sample for a portal.

    Figure 2-3 Setting Properties for DVT


    Setting Properties for DVT

  7. Save the portal.
  8. Run the portal on the server. To do this, right-click the portal file and select Run As > Run on Server. An example initial configuration is shown in Figure 2-4.
Note: Login UI is provided automatically when you enable DVT. Authentication is required for users to see and use the DVT.
Figure 2-4 Portal Page Initial Configuration

Portal Page Initial Configuration

Enabling Dynamic Visitor Tools for a Streaming Desktop

After you have created a .portal file with Dynamic Visitor Tools enabled you need to use the Portal Administration Console to create a streaming desktop using the .portal file as a template and perform some additional configuration. You can then open the desktop and test the Dynamic Visitor Tools. (For information on streaming desktops, see the WebLogic Portal Development Guide.)

  1. Open the Portal Administration Console in a browser and log in.
  2. Create a desktop based on the .portal file you enabled for DVT in Workshop for WebLogic, as explained in Configuring Dynamic Visitor Tools in Workshop for WebLogic.
  3. In the Create Desktop dialog, select the Shell called DVT Header-Footer Shell.
  4. (Optional) Add additional portlets to the desktop pages. Figure 2-4 shows a sample portal with a login portlet and two test portlets.

Testing the DVT

To test the DVT:

  1. In the Administration Console, select View Desktop to view the desktop in a browser.
  2. Log in to the desktop by entering a User Name and Password and clicking Login. The desktop updates to show the DVT Customize menu, as shown in Figure 2-5.
  3. Figure 2-5 DVT-Enabled Desktop


    DVT-Enabled Desktop

  4. Click the Customize menu to display the DVT customization dropdown dialog, as shown in Figure 2-6.
  5. Figure 2-6 DVT Customization Dropdown Dialog


    DVT Customization Dropdown Dialog

The DVT customization dialog provides the following features, by default.

Tip: These features are a subset of features that are available to administrators using the Administration Console; however, when a user modifies a desktop using the DVT, those specific changes are saved and persist for that user only.

Customizing the DVT

Note: Neither the DVT sample nor developer additions are supported.

You can modify the DVT JavaScript source files to customize the DVT sample if you wish. The source files are stored in a J2EE Shared Library. You can view the contents of this library in the Merged Projects view of Workshop for WebLogic. The DVT source is in the samples/dvt folder under the portal web application. To edit a file, you must first extract it from the shared library. In the Merged Projects view, click on any file in italics that you wish to modify. Right-click and select Copy to Project. This action creates a copy of the file in your web project, and this copy overrides the default version in the library module.

 


Deploying the DVT Sample Outside Workshop for WebLogic

Note: This section describes a basic scenario where you edit a configuration file and redeploy an EAR. For information on more advanced redeployment options, see the WebLogic Server document Deploying Applications and Modules with weblogic.deployer.

If you deploy a portal web application that includes the DVT sample application to a domain that lies outside of Workshop for WebLogic, you need to edit the domain’s config.xml file manually as explained in this section.

For example, suppose you use Workshop for WebLogic to create an EAR file and add to the EAR a portal web application with the DVT sample facet included. If you then export the EAR file from Workshop for WebLogic and deploy the EAR to a new portal domain, you will receive deployment errors. The application will not deploy unless you do the following:

  1. Shut down the server.
  2. Open the DOMAIN_HOME/config/config.xml file.
  3. Add the library elements shown in Listing 2-1 to the file. Be sure to substitute the correct path for <WLPORTAL_HOME>.
  4. Save the file.
  5. Restart the server.
  6. Redeploy the EAR.
  7. Listing 2-1 Elements to Add to config.xml
    <library>
        <name>wlp-sample-lookandfeel-web-lib#10.3.0@10.3.0</name>
        <target>AdminServer</target>
        <module-type>war</module-type>
        <source-path>
         WLPORTAL_HOME\samples\lib\j2ee-modules\wlp-sample-lookandfeel-web-lib.war
        </source-path>
        <security-dd-model>DDOnly</security-dd-model>
    </library>
    <library>
        <name>wlp-sample-dvt-web-lib#10.3.0@10.3.0</name>
        <target>AdminServer</target>
        <module-type>war</module-type>
        <source-path>
          WLPORTAL_HOME\samples\lib\j2ee-modules\wlp-sample-dvt-web-lib.war
        </source-path>
        <security-dd-model>DDOnly</security-dd-model>
    </library>

  Back to Top       Previous  Next