2011年1月19日 星期三

JDeveloper - A Java Servlet by using ADF Model

Sometimes a servlet may need to call services provided in the application module (ADF Model default name: AppModule) in the ADF framework. In this article, I would like to show the steps on how to create a Java Servlet which invokes the methods exposed through the application module.

Firstly, you should follow the steps in this blog post to new the ADF web application and setup the DB connection. Make sure you have the following projects, "Model" and "ViewController" projects as below figure.

Then, right click your mouse on the project "Model" and then click "New" to get the pop-up dialog "New Gallery". Select the "ADF Business Components" in the "Business Tier" categories.
Select "Business Components from Tables" in the items, and then press "OK" button to get the pop-up dialog "Create Business Components from Table - Step 1 of 6".

In the pop-up dialog "Create Business Components from Table - Step 1 of 6",  you will see that Step 1 is to create entity objects by tables. Step 2 is create view objects which is able to update by available entity objects. Step 3 is create view objects which is only for read by tables.

Press "Query" directly with the Name Filter "%" will get all the table available in the database schema.

沒有留言:

張貼留言