Show TOC

Procedure documentationAdjusting the Web DC and Creating the JSP Skeleton Locate this document in the navigation structure

 

The first section of the following procedure describes how to add dependency between the web and ejb development components, while the second section shows how to create the managed bean ProjectMB and the JSPs and their implementation.

Procedure

Creating the dependency between the Web and EJB development components
  1. Open the Development Infrastracture perspective by choosing   Window   Open Perspective   Development Infrastracture   .

  2. Under Local Development/ My Components select app_ejb.

  3. Under Component Properties select Public Parts.

  4. Open the context menu of client and select Manage Entities.

  5. Select the following package com.sap.nwce.ra.sedm.ejb.entity and choose Finish.

  6. Select the app_web and under Component Properties, select Dependencies, and choose Add.

  7. Select the app_ejb , then client public part and choose Finish.

Creating the managed bean and the application JSP skeleton
  1. Open the Java EE perspective by choosing   Window   Open Perspective   Java EE   .

  2. Under app_web/WebContent/WEB-INF select faces-config.xml.

  3. From the context menu select Open with —>Faces Config Editor.

  4. Select the ManagedBean tab page, then session and choose Add.

  5. Select the Create a new Java class radio button and choose Next.

  6. Enter the class name ProjectMB and the package name com.sap.nwce.ra.edm.managedbean and choose Next, then Finish.

  7. From the context menu of Web Content, under app_web , select   New   JSP  .

  8. Using step 7 create the following empty JSP files:

    • default (used as a frameset)

    • menu

    • listProjects

    • listEmployees

    • editProject

    • editEmployee

    • setProjectEmployees

  9. Create the navigation rules between JSPs. To do this, from the context menu of the faces-config.xml , select   Open with   Faces Config Editor  .

  10. Open the Navigation Rule tab page and using the Palette create the following navigation rules:

    You can find more details about how to create the JSP navigation in the section below the graphic.

    This graphic is explained in the accompanying text.

Creating the JSPs and the navigation between them.
  1. From the Palette select the Page and click within the faces-config.xml window.

  2. Browse to the menu.jsp and choose OK.

  3. Repeat steps 1 and 2 and for the listProjects.jsp.

  4. From the Palette select Link, then point to the menu.jsp and drag the indicator to the listProjects.jsp.

  5. From the Palette select Select and point to the newly created link between the JSPs and click on it.

  6. In the Properties view, in the From Outcome area, enter listProjects.

  7. Complete the navigation rules as shown in the graphic above.