Director Tutorials


Creating shortcuts with images from the resource set

 
Top of page

Objective

To use scoped paths in the Shortcut portlet for creating dynamic URLs using images from the resource set.

A Shortcut portlet generates a list of shortcut links to Web resources and local applications.

Scoped paths are constructs that allow you to quickly access persistent and nonpersistent data in exteNd Director applications using xPath-like expressions.

A resource set is a location in an exteNd Director project containing application resources that are not stored in a database or defined in the configuration and service files. For example, resource sets can store portlets, pageflows, styles, images, and Java classes.

Before you begin   See About exteNd Director Tutorials

Audience   This section is for all users, whether or not they have administrative privileges.

 
Top of page

Concepts

 
Top of page

Exercises

 
Top of section

Creating a personal page

In this exercise, you will create a new personal page. Later, you will add a Shortcut portlet to this page.

Procedure To create a personal page:

  1. Start the exteNd Application Server where the Express Portal application has been deployed.

  2. Start a browser.

  3. Start the Express Portal application by entering this URL in your browser:

    http://host/ExpressPortal

    The default page for a guest user opens in your browser.

  4. Click Login.

    ExpressPortalLoginSelectAnnot

    The Login dialog opens in your browser:

    tutwwpXpressPortalLoginDialog

  5. Log in as an authorized user, then click login or the Enter key.

    TIP:   If you need to create a user, see the exercise on adding a new user.

    The default page for the user you specified opens in your browser.

  6. On the default page, select Personalize.

    Home2Personalize

    NOTE:   This is the default page for a user who is not an administrator. Your default page will look different if you logged in as an administrator, but the Personalize option is still available in a similar location on the page.

    The Portal Personalizer opens in your browser.

  7. Under Personal Pages select New.

    PersonalizeNewPage

    An untitled page is added to the list of personal pages.

  8. Enter the following properties for the new page:

    Property

    What to specify

    Page Name

    My Shortcut Page

    Description

    Tutorial

  9. Click Update.

    The new page appears in the list of personal pages.

Now you are ready to add a Shortcut portlet to your personal page. You will configure the portlet to display dynamic URLs using an image from the Express Portal project's resource set. Leave the Personalizer running and move to the next exercise.

 
Top of section

Adding a Shortcut portlet to your personal page

Procedure To add a Shortcut portlet to a personal page:

  1. Select My Shortcut Page in the Personal Pages list and click Choose Content.

    The Content Selector displays in a new window.

  2. From the Filter dropdown list choose Accessory Portlets.

  3. From the Available Content list select Shortcut and add it to the page by clicking Add.

    Your Content Selector window should look like this:

    MyShortcutsCreate

Now you are ready to configure the Shortcut portlet to create dynamic URLs with images. Leave the Content Selector open and move to the next exercise.

 
Top of section

Configuring a Shortcut portlet to create dynamic URLs with images

In this exercise you will configure the Shortcut portlet to create dynamic URLs with an image from the Express Portal project's resource set. You will use the predefined Resource Set scoped path which accesses persistent data stored in your exteNd Director project resource set.

Procedure To create a dynamic URL with an image:

  1. In the Content Selector, select the Shortcut portlet in the Selected Content list and click Content Preferences.

    ContentPreferencesSelectShortcut

    The Content Preferences sheet opens.

    TIP:   To get more information about each preference, click Descriptions at the bottom of the sheet.

  2. In the Preference Value column for the shortcut link preference, click the View/Edit Custom Preference link.

    ShortcutViewEditCustomPref

    A second preference sheet opens in your browser containing a set of predefined shortcuts, each with its own set of preferences. You can also add new shortcuts.

  3. Display the preferences for the first predefined shortcut—Novell Developer Kit— by clicking the plus sign to the left of Details.

    ShortcutPreferencesDetails

    The preferences for the Novell Developer Kit shortcut are displayed on the preference sheet.

    TIP:   To view descriptions for each preference, scroll to the bottom of the preference sheet and click Show Descriptions.

  4. In the Image field for the Novell Developer Kit shortcut, enter the following scoped path:

      ${Portal/Url/Resource/images/novell_n_small.gif}
    

    NOTE:   The syntax for entering a scoped path in a portlet preference is ${scoped path}. In this example, the scoped path Portal/Url/Resource/images/novell_n_small.gif accesses a GIF image in the Portal application's resource set. As its name suggests, the image is a small version of the Novell logo (red N).

    Your preference sheet should look like this:

    ShortcutImageField

  5. Close the preferences for the Novell Developer Kit shortcut by clicking the minus sign to the left of Details.

  6. Repeat Step 3 through Step 5 for the other predefined shortcuts to Novell sites that appear on the preference sheet:

    1. Novell exteNd Product Information

    2. exteNd Documentation

    3. Novell Forge

    4. Novell on Linux

  7. Scroll to the bottom of the preference sheet and click the Save button.

    PreferencesSaveButton

  8. Click Return to List View.

  9. Click Save Preferences.

    Your changes are recorded and you return to the Content Selector.

  10. Click Save Contents to dismiss the Content Selector.

Now you are ready to test the dynamic image URL you just created in your My Shortcuts portlet. Leave the Portal Personalizer running and move to the next exercise.

 
Top of section

Testing the dynamic image URL

Procedure To test the dynamic image URL:

  1. In the Portal Personalizer, click Portal.

    Personalizer2Portal2

    Your default portal page opens in the browser.

  2. Select My Shortcut Page under Personal Pages in the navigation list.

    MyShortcutsPageSelect

    My Shortcut Page appears in the content area of your browser, displaying all the predefined shortcuts in the My Shortcuts portlet window. Note that the Novell logo image (red N) appears next to each of the predefined Novell shortcuts:

    NovellLogoImageShortcuts

    Each logo image is a dynamic link to the associated Web page or application specified in the shortcut.

  3. Click the red N next to Novell Forge.

    NovellForgeShortcutImageSelect

  4. The Novell Forge Web site opens in a new browser window, as in this example:

    NovellForgeSite

    TIP:   To learn how to register with Novell Forge and log in using form-based authentication, see the tutorial Using Shortcut portlets for form-based authentication.

 
Top of page

What to do next



Copyright © 2004-2005 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...