I need to be able to connect to multiple databases within one ADF application. After searching through previous threads here, I decided to create a separate Model project within the application to keep the different databases' AM, VO, etc. separated from each other.
I am able to create the extra Model project, but how do I get the AM and VO from the 2nd Model project to appear in the DataBindings.cpx in the ViewController project so I can access them via Beans? I added the 2nd Model to the 'Dependencies' for the ViewController properties, but I did it after I had created the AM and VO. If I add the dependency before creating the AM and VO, will jDeveloper auto-populate them into the DataBindings.cpx file for the ViewController?
Is there somewhere else I need to look to be able to get the 2nd Model to be seamlessly recognized throughout the project like the 1st Model?
Thanks in advance...
double click the view controller project and select dependencies. make sure all the models are listed. if not, add the missing ones.
i haven't tested this out, but I would expect this to be needed.
also, this post on proper steps for deployment may list some other settings to verify (see application assembly) Proper Steps for Deployment
Edited by: Stuart Fleming on Nov 29, 2012 6:37 PM
The AppModule is visible in the Data Controls panel on the side bar just like the Data Controls from the other Model, but for some reason the AppModule from the 2nd Model isn't appearing the ViewController's DataBindings.cpx listing of "Data Control Usages".
That makes me think that maybe I did something out of sequence for jDeveloper to be able to auto-create all of the links in the background.
I checked those settings, and they look correct. The 2nd model is showing up in all of the Application/ViewController settings correctly, but the AppModule from the 2nd model isn't showing up in the ViewController's DataBindings.cpx "Data Control Usages" section.
I will try removing the AppModule from the 2nd Model and recreating it to see if it auto-populates into the DataBindings file now that the dependencies are set up correctly (they weren't set up when I initially created the 2nd Model's AppModule).
Wow.. What a simple fix...
I should have read the first line on the DataBindings.cpx screen: "This file defines the Oracle ADF binding context for your application. JDeveloper creates this file *_the first time you data bind a UI component_*."
The reason my 2nd AppModule hadn't appeared in the DataBindings file was because I hadn't bound it to a UI component - I'm working with servlets and managed beans to get access to this particular AppModule. I created a blank JSPX page and dragged the VO from the AppModule to the blank page and created a simple Read Only table from the VO. That forced JDeveloper to create the binding entry in the DataBindings file. Now I can delete the 'dummy' jspx page and the Binding remains in the DataBindings file.
Sometimes it's the simple things...
Still, it would be nice if there was a way for JDeveloper to create the binding entry without having to create a 'dummy' jspx page and UI component. Something like 'Right-Click' on DataControl -> "Create ViewController Binding Entry". Does anyone else run into this issue of only using some AppModules at the programmatic level?
Edited by: cjones on Nov 30, 2012 11:11 AM