Show TOC Start of Content Area

Procedure documentation Retrieving Bean Classes from .jar Files  Locate the document in its SAP Library structure

You can use any locally available .jar file that contains JavaBean classes to import to a local Non-Development-Component (DC) Web Dynpro project. During the import, you need to specify whether the .jar file is to be part of a deployable unit or only be available for design time support.. By using a .jar file, you therefore set up either a design-time dependency or a deploy-time dependency:

      To allow the .jar file to be part of the deployable unit, an entry is made in the \lib-project directory. This entry is added to the project as a shared reference via method addSharingReference.

      If the .jar file is only meant to be available at design time, it is added to the class path.

Prerequisites

      You have started the JavaBean Model Importer for a locally or centrally versioned Web Dynpro project.

      If the .jar file is meant to be available at design time, it must be deployed before the import process.

      Importer has been started.

Procedure

       1.      To retrieve the classes from the .jar file, choose Local JAR file.

       2.      Choose Add JAR …, then you enter the path for the locally available .jar file via Browse where the directory of the  .jar file is irrelevant.

       3.      Option Design Time (compile time dependency only, JAR will be deployed using a different deployable unit) is selected by default. The JAR path and JAR dependency (design time (DESIGN_TIME) or runtime (DEPLOY_TIME) dependency) are now displayed in a table.

       4.      Select Java classes for the import and assign them to the model using Add ->. The display for the specified classes is transferred from the left JARs window to the right Model window. If you also want to transfer the superclass and the interfaces for the model, select the relevant option.

       5.      In the window containing the model class details, you can see the properties of the class, as well as any inheritance and the relations within a separate tab. At this point, you can still deselect any classes or properties that you do not want to include in the import.

       6.      The last window shows the import log and supplies detailed information about the model object. Note that the import cannot be completed if the log contains any error messages.

       7.      Finish initiates the model generation. In the case of a deploy time dependency of the .jar file, the system displays a dialog box with the success message The Jar is successfully imported to the lib folder of the project which you confirm.

End of Content Area