Show TOC

Tutorial: Using the Navigation APILocate this document in the navigation structure

Prerequisites

  • SAP NetWeaver Developer Studio is installed and started

  • The Navigation API is available with the AFP installation

Context

This tutorial walks you through the steps necessary to implement a basic quick launch utility using the Navigation API.

You create a navigation iView with an input text box. In this box, you can enter the navigation node which you want to launch. The text box has an auto-complete capability and displays a drop-down list of available navigation nodes. Once you press Enter , the selected node is launched.

Procedure

  1. In SAP NetWeaver Developer Studio, open the Enterprise Portal perspective and create a portal application project.

    For more information, see Creating a Portal Application Project .

  2. In the portal application project, create a portal component with AbstractPortalComponent.

    For more information, see Creating an AbstractPortalComponent .

  3. In the dist\PORTAL-INF\jsp subfolder, create a JSP file names QuickLaunch.jsp.

    For more information, see Writing JSP Pages .

  4. Paste the following code into the portal component's doContent() method. This code attaches the JavaScript files to the portal component.
    
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
    {
     IResource jspResource = request.getResource("jsp", "jsp/QuickLaunch.jsp");
     response.include(request, jspResource);        
    }
    
                   
  5. Write the JSP code

    .

  6. Deploy, integrate and test your application:
    1. Create a portal archive and deploy it to a portal.

      For more information, see Deploying a Portal Application .

    2. Create an iView from the QuickLaunch portal application.

      For more information, see Launching the iView Wizard and General Information .

    3. To avoid displaying the iView's tray, open the Property editor for the iView and set the Show Tray property to No .

      For more information, see Editing Object Properties .

    4. Add the Quick Launch iView to the Left Navigation Panel Container:

      1. In the Portal Content Catalog, open the Ajax Framework Page for editing.

      2. Add the Quick Launch iView to the page as a delta link.

      3. Choose Page Layout and drag the Quick Launch iView to the Left Navigation Panel Container .

    5. Test your application.