Dive into Oracle ADF

Send me a mail
 Dive into Oracle ADF   Click to see the XML version of this web page.   (Updated: 2/3/2008; 9:18:00 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

Search blog with Google:
 

Search BC4J JavaDoc:
 

September 2005
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Aug   Oct

Get Firefox!

Thursday, September 29, 2005

Over on the JDeveloper OTN forum, some customers already trying out our 10.1.3 Early Access 1 release have asked for an example of how to refer to ADF bindings and the ADF binding container from a JSF backing bean.

We're trying to make this easier and more automatic for 10.1.3 production, but in the interim I've added Example # 51 to my Not Yet Documented Examples page called "Example of Accessing Bindings and BindingContainer as Managed Properties in JSF Backing Bean".


5:16:53 PM    



I got an email today with a question I thought was common enough to share the answer to. The question was:

I am currently working on a project for a partner where we will be using ADF BC as our model layer for a large application. In order to keep the footprint of each application module down to a reasonable size, we are intending to create a number of separate  'root' application modules for each functional area of the application. Within, these 'root' application modules we will then use nested application modules to further partition the application. All of the application modules will be accessing the same datasource and will need access to the same database objects.

In order to separate our code between the development team and into function areas, our initial thoughts were that we would create an ADF BC model project containing Entity Objects for all of the database tables e.t.c. as these are common amongst all functional areas. We have configured all of the EOs for validation rules, defaulting values and extending doDML() as appropriate. Happy at this stage we then created a simple .jar file to deploy all of the definitions. Upon creating a new ADF BC project for each functional area we added the jar file as a library import into the new project. However when we the tried to create some new View Objects via the JDev Wizard we were unable to see the imported Entity Objects.
 
Is the only way to share Entity Object definitions between different ADF BC projects to manually copy the source definition files into the new projects src directory? Since this would mean multiple copies of the same components, it could prove to be a maintenance nightmare.Is there a way of doing it without creating multiple copies of the same object definitions?
The developer is spot on in their ideas of layering and reuse, and even has created a library for their reusable entities. This last step is not something everyone thinks to do. The missing step is known as "importing" components, so with that one extra bit of knowledge under his belt, he should be able to do exactly what he envisions. My little article called  Difference Between Adding and Importing Business Components tries to explain the difference and gives the menu options to choose to perform the importing.
 

In JDeveloper 10.1.2, the imported components appear in the application navigator just like the components that belong to the project, however the imported components are read-only. The packages of business components also appear in the various ADF Business Components design time dialogs, allowing you for example to build a new view object based on an imported entity object, or to build a new entity object that extends an imported entity object. 

In response to feedback from various developers working on large, projects like this using ADF Business Components, in 10.1.3 we prevent the imported components from appearing the application navigator (so they don't add clutter). This makes them behave just like imported class libraries of other kinds of Java things you use. They are referenced in your library list, but don't actually clutter up your existing project contents. However, the imported components of course still appear in the ADF design time wizard and editor dialogs Available lists so you can reference them when you need to.


2:02:15 PM    


© Copyright 2008 Steve Muench.