Using this model type you address an existing JavaBean. The model tools in the Developer Studio provide design time support in the form of the Web Dynpro model for using JavaBeans for a Java Web Dynpro application. The following support is provided for using JavaBeans:
● Interfaces
● Inheriting JavaBean classes
● Abstract JavaBean classes (in addition to the interfaces)
● Enhanced support for multiple JavaBean sources
○ Project
■ As the source for the JavaBean import, you can define either the source folder of the project or the entire class path.
○ Local.jar file
■ Here, you can define whether you want to set up a dependency at design time or for the deployment.
○ Public parts of used development components (DCs)
The DC is responsible for the usage modality with regard to runtime support.
In addition to the interface import support, it is also possible to reuse abstract JavaBean classes. When you select a JavaBean class to be imported, you can automatically add the corresponding superclass and the interface classes. This import behavior is optional: If you do not select Add Corresponding SuperClass and Interfaces, only the specified classes are imported. No duplication of model properties and model relations takes place. The superclasses and interface settings are assigned to the relevant model class (modelClass.setSuperClass(), modelClass.addInterface()).
You have the following options when importing a JavaBean:
1. From a project
a. Option Project (source folder)
Here you import JavaBeans that were implemented within the Web Dynpro project.
b. Option Include associated projects
Provides the following extended project import options:
i. Project source folder
ii. External internal .jarfiles
iii. Referenced projects with their source folders and .jar files (recursive)
2. From a local .jar file
Option Local JAR file
A distinction is made here between locally available Web Dynpro projects and development component projects of the type “Web Dynpro” that are part of the infrastructure.
a. Local Web Dynpro project
With this project type, you can select any locally available .jar file for import. You can also specify whether the .jar file is to be part of a deployable unit or only available for design time support..
i. If the .jar file is to be part of a deployable unit, the file is placed in the \lib folder of the project as a “shared reference“ for the project (method addSharingReference).
ii. If the .jar file is not to be part of a deployable unit, it is merely added to the class path. To be able to use the.jar file for design time support, it must have been deployed with a different application entity; there is only one dependency at compile time.
b. DC project of type Web Dynpro
You can select from all public part archives. The rest of the procedure during the import is very similar to that for the .jar import option for local Web Dynpro projects. The only difference is that no separate step is required for specifying whether the .jarfile is to be used for design time support or runtime support. The DC carries out this step itself by taking the public part property Assembly or Compilation into account accordingly: In the case of a public part of the type Provides an API for developing/compiling other DCs, the object .jarfile is visible to the other development components; if the public part is of the type Can be packaged into other build results, it cannot be used for compiling the component.
Importing a JavaBean Model for the DC Project
Importing a JavaBean Model for the Local Project
Retrieving Bean Classes from a Source Directory