JDeveloper and ADF


How to get list of all application module names from a Model project?


Hi All,Is there any way I can get list of all the available root application module names from a ADF BC Model project programmatically? Once I know the root AM, I can use the public java.lang.String[] getApplicationModuleNames(boolean inclLoadedOnes, boolean fromDef) to get the nested AMs. But how do I get the available root application module names programmatically ?  Please let me know if there are any APIs for this. ThanksAshwini
You can get to the root application module using below code from one of the existing application module Impl -
import oracle.jbo.server.DBTransaction;
DBTransaction txn = (DBTransaction)this.getTransaction();
AppModule rootApp = txn.getRootApplicationModule();
rootApp.getApplicationModuleNames(); // Returns an array of names of the nested Application Modules that are currently loaded within this Application Module.
 
Thanks Srini but this won't help. I want to get the list of all the root application modules in a POJO. I cannot write this inside app module impl.  Going through parsing bc4j.xcfg is the last option, but I want to know if there is already any API for this. Is there any way to get this DBTransaction outside app module? May be by providing JNDI name etc?  ThanksAshwini
Ashwini - By POJO, do you mean a backing bean? Because nesting of application modules can happen dynamically based on how the taskflow transaction option is configured. That was just to point out that nesting may not be static always. If you are trying to do this via a backing bean, you can still write this code in AMImpl and invoke it as a method binding which would be the easiest option.  Maybe some more clarity on what you are trying to achieve would help.
try like this...                 Map sessionMap =          FacesContext.getCurrentInstance().getExternalContext().getSessionMap();          BindingContext context =          (BindingContext)sessionMap.get(BindingContext.CONTEXT_ID);          context.getDefaultDataControl().getApplicationModule();
hi,  check below once, may it will help u-             oracle.adf.model.BindingContext context = BindingUtils.getBindingContext();            DCBindingContainer bc = (DCBindingContainer)context.getCurrentBindingsEntry();            DCDataControl dc = bc.findDataControl("XYZDataControl");            ....            ...         ViewObject vo = dc.getApplicationModule().findViewObject("ABCVO");          ....         .....  thanks,prashant
Thanks to all your replies.  #Srini - by POJO - I mean a independent Java Class - could be referred as service class, preferably in Model project. Since it is independent of any AppModule Impl classes, I want to see if I can get any reference of all the available App Modules in the project.#Puthanampatti - I tried the code you have given, but it doesn't give me the actual list of objects within the Module, returns a null object.#Prashant - I really cannot do any hardcoding. So all I want is - without doing any kind of hardcoding (since I don't know any of the name) - I want to get list of all app modules. This is required for a reusable program - since it would be a question as why is it needed. I have gone through pretty much each method that I could see in the list of available API documentation. But could not find any. So would like to know if you ADF Experts have found any such method already or if I missed anything.  Thanks,Ashwini
Since it is a stand-alone java class, then none of the FacesContext code would work for you. And your source of truth would be the nested modules defined in the application modules XML file. Are you then not better off parsing the AppModule xml file to determine the nested modules using a simple DOM Parser?
Thanks Srini. I guess the only way out is to parse the xml file to get list of app modules. Thanks all once again for your replies. -Ashwini
Please close the thread Ashwini by marking the correct answer. Forum users generally track unanswered threads to respond and this would come up on that list.

Related Links

Problem in deploying ADF application
Jdeveloper 11g project set-up question
Need a Simple Example Program That Uses Bounded Task Flow Template
How to set up fixed height in ADF layout component
ADF 11g + View controler resource bundle
How to deploy ADF-BC (SDO) with ANT
deploying from jdeveloper without data sources
Opening new nonmodal window from action of commandImageLinkCommandButton
ADF Application creating multiple BPEL processes
Printable page and showPrintablePageBehavior
Emailable Page
How to capture a data change event in Swing/ADF application?
Create a ADF component by Class.forName (11g)
how to set logoImagePath  in oracle Dynamic Tabs Shell
InvokeApplicationPhase
How to display a small sized font text just below the inputText using ADF

Categories

ORACLE DEV
WebCenter Content
Designer
BI Beans
Java and JavaScript in...
E-Business Suite Techn...
Database Security
OLAP
Service
Streams
Calendar Web Services ...
SOA & Process Management
Secure Enterprise Search
Content Database
Recovery Manager (RMAN...
Oracle CRM On Demand A...
Audit Vault
Field Service
Planning and Budgeting
Financial Data Management
Oracle Virtualization
Upgrades
e-Tester
QA/Testing
JRockit
bea.education.weblogic...
WebLogic Server/Java E...
weblogic.developer.int...
weblogic.developer.int...
weblogic.developer.int...
weblogic.developer.int...
WebLogic Portal Newsgr...
AquaLogic Service Bus ...
AquaLogic BPM Newsgroups
BEA SALT
Remote APIs
JSR 168 & WSRP
Primavera Project Plan...
Primavera Inspire
LCM: Oracle Applicatio...
WebLogic Server - JCA
Virtual Assembly Build...
Forums Moderator Migra...
Java 2D
Collections: Lists, Se...
JDK's Monitoring & Tro...
Java Platform Debugger...
Java Virtual Machine (...
Java ME SDK
Java Servlet
Kerberos & Java GSS (J...
Abstract Window Toolki...
Java Plug-In
Java Technology & XML
Java Community Process...
Solaris Networking
General Discussion [AR...
Systems Networking
ONE Application Server 6
General Java Embedded ...
Big Data
Calc Manager
Oracle JRockit (Japanese)
Oracle Application Ser...
Oracle FLEXCUBE Core B...
JD Edwards EnterpriseO...
JD Edwards (Chinese)
Daily Notifications
Oracle Mobile Security...
Oracle Developer Cloud...
Influence
Database Track
Eloqua For Sales
Data Quality and Clean...
Social Media Hub
Sweden Eloqua User Group
United Kingdom User Group
Eastern Canada Eloqua ...
SiteCatalyst
Non-profits and Member...
CBI Topliners Group
API Management
Oracle Marketing Apps
Systems Configuration ...
Oracle Process Cloud S...
Getting Started
OMC - Industry Solutio...
Oracle and TCS Initiat...
Optimized Solutions
Oracle Linux Networking
Synopsis
Oracle Application Bui...
DBA Gruppe
Oracle Insurance Polic...
Oracle Application Ser...
Discoverer
LCM: Managing Oracle A...
Data Mining
Oracle on Apple Mac OS X
Oracle Modernization
Hyperion System 9 Appl...
Administration
Oracle Authentication ...
On Demand: Beehive
weblogic.developer.int...
产品专区
Tuxedo (Chinese)
Storage General Discus...
データベース一般
Middleware Track
BICS Upgrades

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile