Showing posts with label ADFModelLibrary. Show all posts
Showing posts with label ADFModelLibrary. Show all posts

Friday, November 24, 2017

Creating ADF Model Project as Library to be reused in other Application

The requirement here was to reuse one of the Model Project in a different ADF application. The new application needed to use few of the view objects from already created in Model project of different application. For this purpose we created ADF Library JAR of the Model project and reused in the new application.

Please refer official Oracle link for more details

Steps:

First we shall create deployment profile for the existing Model Project

1. In the Project Properties dialog, select Deployment and then click New.

2. In the Create Deployment Profile dialog, select ADF Library JAR file for Profile Type, enter a name or accept the default name for Deployment Profile Name, and click OK.

Description of Figure 50-6 follows
3. In the Applications window, right-click the project and choose Deploy > deployment, where deployment is the name of the deployment profile.

4. The Jar would be available in <Applicatio_Home>/Model/deploy


Now we need to use this library in our new project.
Steps for the same:
5. In consuming project, from the main menu, choose Tools > Manage Libraries.

6. In the Manage Libraries dialog, click Load Dir.

7. In the Load Directory dialog, select the directory where the secondary JAR files are located and click Select. This should be the same location specified in Step 4.


8. Right-click the project and select Project Properties.

9. In the Project Properties window, select Libraries and Classpath and click Add Library.

10. In the Add Library dialog, select the library, click OK and then click OK again.


After this the view objects shall be available in new appmodule of the new Model project(If not, restart the Jdeveloper).

Please post further question in comments if you have any