Oracle ADF Interview Questions and Answers
Oracle ADF Interview Questions and Answers
Oracle ADF Interview Questions and Answers
DEVELOPMENT
FRAMEWORK (ADF)
Questions and Answers
Table of Contents
1 Overview of Fusion Middleware and ADF ........................................................ 1
2 Understanding Development Tool: JDeveloper ................................................ 5
3 Modeling Database Schema ........................................................................... 7
4 Building Business Service with Default ADF Business Components.................... 8
5 Persisting Data using Entity Object................................................................10
6 Querying Data using View Object ..................................................................12
7 Exposing Business Service through the Application Module .............................16
8 Declaratively Customizing Business Services ..................................................18
9 Validating Business Services .........................................................................20
10 Introducing User Interface Technologies .......................................................23
11 Getting Started with Rich User Interface ........................................................25
12 Planning Pages using Layout Components .....................................................27
13 Designing User Interfaces and Page Flows.....................................................28
14 Interactively Controlling with Navigation Components ....................................31
15 Ensuring Reusability in Web Applications .......................................................32
16 Working with Scopes, Parameters and Partial Page Refresh ............................34
17 Responding to Managed Beans, Events and Listeners .....................................37
18 Binding Model Layer with Business Services and Databound View ...................42
19 Querying Data with Search Components ........................................................42
20 Implementing Transactions ..........................................................................42
21 Understanding Data Controls and Bindings ....................................................43
22 Programmatically Customizing Business Services............................................48
23 Deploying ADF Applications ..........................................................................49
24 Securing ADF Applications ............................................................................49
25 Debugging and Troubleshooting ADF Applications ..........................................50
26 Best Practices ..............................................................................................51
27 Miscellaneous Topics ....................................................................................52
28 Advance Topics ............................................................................................54
i
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
1/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
ADF Model: Data Binding (.cpx, .xml) & Data Controls (.dcx)
ADF Business Components: VO, EO & AM
3/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
Wizard Developers find hardly any wizards ADF is all about wizards and when
to help in building framework users make proper use of these
features wizards, they make the application
work for the business requirements—
and ADF provides all the source code
Servers The framework can make use of Built-in Weblogic server configurations
web application servers like Apache make deployment much easier
Tomcat, Websphere, JBoss, etc.
4/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
5/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
6/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
7/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
Application Module
Business Service
Service Data Object
9/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
19. Can we have entity objects to inherit from one another? If yes, how?
Entity objects use a single table per hierarchy approach while implementing multiple-inheritance.
20. Does EO have Primary Key if the DB table doesn’t have Primary Key?
Yes, creates one from RowID
10/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
Composition (dependent)
Destination entity is completely dependent on source entity
Source entity owns destination entity
No destination entity can be created without the owning entity existing first
Source entity cannot be deleted without deleting all its associated destination entities
11/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
12/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
13/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
Updatable
14/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
15/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
16/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
17/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
18/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
19/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
53. What is the difference between the primary key and a unique key?
Primary Key:
Can be only one in a table
It never allows null values
Primary Key is a unique key identifier and cannot be null and must be unique.
Unique Key:
There can be more than one unique key in one table.
Unique key can have null values
It can’t be candidate key
Unique key can be null and may not be unique.
20/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
62. What is the difference between Entity and View Accessor in Key Exists
validator?
Use Case:
Validate Employees and Departments
Validate Jobs
Validation Target Type:
Entity: If the two tables are related and there exists an association between the two
View Accessor: Tables are not related or the result set comes from a query
65. What is the difference between List validator and Key Exists validator?
Use Case:
Validate Jobs (List Validator)
Validate EmployeeByEmail (Key Exists Validator)
Validation Rule Type:
List Validator should be used typically when
The query results are small as the results are cached
There are no bind variables in the query
The query does not have to be executed again in the same transaction
Key Exists Validator List should be used typically when
The query uses a bind value in the query and hence needs to be executed every time
as needed
The bind value is required in the query as otherwise, the result set may be quite large
21/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
70. What are the two failure severity levels for error messages?
Error
Informational Warning
22/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
23/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
24/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
77. What are the different kinds of resource bundles supported in ADF?
ADF supports different types of resource bundle which are as follows:
Property file-based (text file which contains key-value pair)
Xliff file-based (XML file which contains key-value pair)
List Resource bundle
80. In which XML do you configure the skin for your framework application?
trinidad-config.xml
26/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
84. What is the difference between visible property and render property?
The visible property is set to true/false based on the requirement whether we want to see the
field on the page or not at run time. The field or component still exists on the page, though hidden.
The render property is used to conditionally load the component based on criteria.
87. Why you should avoid changing styles like inlineStyle or styleClass?
Changing styles (e.g. inlineStyle or styleClass) can impact the ability for a component to
stretch or flow. Don’t modify styles; instead, solve problems using a declarative approach to
insulate you from browser-specific issues
27/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
90. What is task flow? How many types of task flows ADF support?
Task flow is the Component of Oracle ADF which is used to define the simple task after successfully
defining task-flow can consume any number of times.
ADF supports two kinds of task flow:
UnBounded Task flow:
Can directly run on the browser
The first entry on task flow stack—the outermost task flow
No well-defined boundary or single point of entry
Use an unbounded task flow if your application has multiple points of entry
Can be used to define the “top level” flow of an application
Bookmarkable pages
The source file is adfc-config.xml
Bounded Task flow:
Require the page on which they will consume
Single point of entry
Well-defined boundary
pageFlow Memory scope
Declarative transaction management
Declarative Back button support
91. What is the behavior of the router in the ADF task flow?
Based on some condition router can decide which route needs to be followed. If none of the
condition match in that case router will follow the default route defined by use.
96. Can ADF task flow hold more than 1 view activity?
Yes. ADF task flow can have multiple view activity but 1 activity has to be defined as the default
activity.
28/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
97. What is the difference between Bounded and Unbounded task flows?
Unbounded Bounded
The first entry on task flow stack Added to task flow stack when called
No well-defined boundary or single point Single point of entry, with zero or more exit
of entry points
Cannot be used as a region on a page Can be used as a region on page with page
fragments
Not securable on its own; uses page Can be secured separately from pages
security
Cannot manage transactions or save for Declarative transaction management, save
later for later
Can directly run on the browser Cannot directly run on the browser
100. Difference between JSF Page Flow & ADF Task Flow?
JSF Page Flow:
The entire application must be represented in a single page navigation file (faces-
config.xml). Although you can have multiple copies of faces-config.xml in a project, the
application loads these files as one at runtime.
All nodes within a JSF page flow must be JSF pages. No other types of objects can exist
within the JSF page flow.
Navigation is only between pages.
Application fragments cannot be reused.
There is no shared memory scope between multiple requests except for session scope.
ADF Task Flow:
The application can be broken up into a series of modular flows that call one another.
29/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
You can add to the task flow diagram nodes such as views, method calls, and calls to other
task flows.
Navigation is between pages as well as other activities, including routers.
ADF task flows are reusable within the same or an entirely different application. After you
break up your application into task flows, you may decide to reuse task flows containing
common functionality.
Shared memory scope (for example, page flow scope) enables data to be passed between
activities within the task flow. Page flow scope defines a unique storage area for each
instance of an ADF bounded task flow.
Task flows provide a more modular and transaction-aware approach to navigation and
application
101. How to convert an ADF bounded task flow to Unbounded Task Flow or
Page Fragments?
In the editor, open the bounded task flow diagram.
Right-click anywhere in the diagram other than on an activity or control flow.
Choose a menu item such as Convert to Unbounded Task Flow or Convert to Task Flow with
Page Fragments.
If the bounded task flow contains fragments, the menu item will be Convert to Task Flow
with Pages.
103. Can we use a task flow with the JSF page as a region?
No
104. How can we use the task flow with a JSF page as a region?
By using the context menu command “Convert To Task Flow With Page Fragments...”
105. Can you convert unbounded task flow to bounded task flow?
No, but we can extract part of it as TF by using the context menu “Extract Task Flow…”
106. How can we convert bounded task flow to unbounded task flow?
By using the context menu “Convert To Unbounded Task Flow”
30/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
31/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
112. What are the ADF templates, jspx pages, jsff page & declarative
components?
ADF Faces provides the following types of reusable building blocks:
Page fragments (.jsff): Page fragments allow you to create parts of a page. A JSF page
can be made up of one or more page fragments. For example, a large JSF page can be
broken up into several smaller page fragments for easier maintenance. We can create a page
fragments template & use to create page fragments.
Page templates (.jspx): By creating page templates, you can create entire page layouts
using individual components and page fragments. For example, if you are repeatedly laying
out some components in a specific way in multiple JSF pages, consider creating a page
template for those pages. When you use the page template to build your pages, you can be
sure that the pages are always consistent in structure and layout across the application.
Using default layouts or creating new we can create page templates. Example: Using
<f:facet> we can create page templates with header, footer, top, left & right regions etc.
Declarative components: The declarative components feature allows you to assemble
existing, individual UI components into one composite, reusable component, which you then
declaratively use in one or more pages.
For example, if you are always inserting a group of components in multiple places,
consider creating a composite declarative component that comprises the individual
components, and then reusing that declarative component in multiple places
throughout the application.
Declarative components can also be used in page templates.
Declarative components can also be used in other applications, it’s possible after
creating JAR file of that component.
32/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
33/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
117. What are the different scopes of the ADF task flow?
Isolate/Shared. The shared scope will share data among the multiple instances of task flows while
Isolated doesn't.
121. How to use the same value in multiple activities of a Task Flow?
34/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
Using Shared memory scope (for example, page flow scope) enables data to be passed between
activities within the task flow. Page flow scope defines a unique storage area for each instance of
an ADF bounded task flow.
Any managed beans you decide to use within task-flow can be specified in page flow scope, so
are isolated from the rest of the application
126. What is PPR and how do you enable Partial Page Rendering (PPR)?
PPR is a feature supported by ADF Faces, using which we can render a small portion of an HTML
Page, without refreshing the complete page. It is enabled by.
Setting autoSubmit property to true on the triggering element.
Setting the partialTriggers property of the target component to refer to the component
id of the triggering element.
36/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
38/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
39/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
40/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
41/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
20 Implementing Transactions
148. How can you manage the transaction in ADF?
We can manage transactions using Application Module, different Application Modules, Bounded
Task Flows & at ADF Data Control Level.
149. How can you force ADF task flow to use new transactions every time task
flow is called?
Go task flow overview and select always begin new transaction from the dropdown.
150. How to use the same transaction in the ADF task flow?
Go task flow overview and select ‘always use existing transaction’ from the dropdown.
42/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
43/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
44/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
45/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
161. In the case of java control or EJB does it have a datacontrol.dcx file?
datacontrols.dcx exists when you create custom data controls based on POJOs, web services,
EJBs and the like. It describes or stores the metadata about the data control, essentially the wiring
required to make the underlying service (e.g. POJOs, web services) exposed through the data
control palette, and runtime settings so the ViewController layer knows how to make use of it.
46/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
162. Write code to access the current row and or the view object inside your
bean?
Code to access the current row and or the view object inside your bean:
BindingContainer bc =
BindingContext.getCurrent().getCurrentBindingsEntry();
DCBindingContainer dcbc = (DCBindingContainer) bc;
DCIteratorBinding lBinding =
dcbc.findIteratorBinding("EmployeesViewIterator");
EmployeesViewRow row = (EmployeesViewRow) lBinding.getCurrentRow();
EmployeesView view = (EmployeesView) lBinding.getViewObject();
47/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
168. Explain the different types of VO’s Java classes that can be generated?
<ViewobjectVO>Impl.java:
Is the view class
Provides methods to manage the row set
<ViewobjectVO>RowImpl.java:
Is the view object row class
Is instantiated for each record returned by the query
Provides attribute accessors
<ViewobjectVO>DefImpl.java:
Is the view definition class
Represents the whole view
Can be used to modify the view definition
169. Explain the different types of AM’s Java classes that can be generated?
<AppMod>Impl.java:
Contains all the methods and behaviors that affect each AM instance
<AppMod>Def.java:
Contains methods to be used by all instances of the application module
48/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
49/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
180. How would you test business service in isolation from views or
controllers?
Using ADF Model Tester and
Using Java test clients
50/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
26 Best Practices
182. Give some best practices in ADF?
1. Do not use invokeAction in pageDef because it will be executed several times. Use
instead of a task flow with a method call in front. Also, using this approach, we can reuse
the page in other task flows.
2. Do not create view criteria containing the name of the view since the name of the view could
be changed and then also, the criteria name should be changed.
3. Use unbounded tasks only for pages or bounded task flows available as bookmarks.
4. Do not use unbounded task flows for the following operations: create, update and delete. It
should be used only for read operations.
5. Do not add service methods in the application model that are dependent on the view iterators
(default iterators). Use instead of standard operations like CreateWithParams,
ExecuteWithParams, etc.
6. Create secondary iterators for views in the service methods. Do not use default iterators
because they are the same used in the view layer.
7. Do not add HTML in JSF. Use instead styles and/or CSS for available ADF components.
8. Try to not use the view’s attributes in the WHERE clause for filtering. Use instead default
criteria for each view instance from the application model.
9. Do not use two services layers separately with different database connections to the same
database if is not needed. Use instead of nested application models.
10. Always use the scope prefix for any accessed memory variables (requestScope,
backingBeanScope, viewScope, pageFlowScope, sessionScope,
applicationScope, backingBeanScope).
11. Put the Cancel operation in af:subform and with immediate=true, to ignore the
validations of other input fields which have immediate=true.
12. In the context of fragment-based task flows, use viewScope in preference to request scope
for a more predictable behavior within the context of the sub-flow that contains the
fragments
13. Task flows should always contain an activity marked as an exception handler. This activity
does not have to be a view activity it can be a method or router (our preferred approach)
with control flow rules to subsequent activities.
14. Use SetPropertyListener instead of SetActionListener (was deprecated in 11g).
15. Do not combine view accessors with data model master-detail because accessor attributes
create distinct row sets based on an internal view object other than that from detail.
16. When a view criteria is applied programmatically in a business method from the application
model later the view criteria must be removed.
17. Try to use the data model master-detail only for composite relations.
18. For a performance increase, you can tune the view instance from the application model to
get from DB more than one row once. By default, it is 1.
51/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
27 Miscellaneous Topics
183. What are some of the ADF 12c features?
Business Components:
Support for offline databases: The user can create new offline database objects based on
existing objects in a database. The user can also compare the two. New wizards make
working easier.
Support for RowFinder feature: The Row Finder feature provides users a declarative means
of using a View Criteria on a View Object. A use case is to use a Row Finder object to find a
row (or a set of rows) in a single subordinate detail table based on a row in a master table.
Support for multiple required View Criteria: Multiple View Criteria can be created on a single
View Object. Besides, one or more of them can be marked as required so that one can now
have multiple mandatory View Criteria being used per View Object.
Groovy Debugging: One can set breakpoints and use the debugger to debug Groovy
expressions.
REST Web Service Improvements:
Include children in describe: Clients can request information about the collection and
nested resources using the new "includeChildren" query parameter. When a
resource item is requested and includeChildren=true is provided, all children will
be recursively included in the describe.
Expand multiple levels of children: The expand query parameter is enhanced to support
multiple levels, for example:
"app/rest/Accounts/12345?expand=Contacts,Contacts.Addresses"
returns all contacts for the account and all addresses for the contacts.
Versioning of REST payload formats is now supported, enabling clients to continue
working with older formats when backward incompatible changes are introduced.
Improved query capabilities: For richer querying support, the query parameter accepts
a new SQL-like VC filter expression format that identifies the specific rows to retrieve
from the resource. Example: (AssignedTo_Id is null) or ((Priority <=
2) and (RecordName like 'TT-99%'))
ADF Model:
Bean Data Control Improvements:
Create Bean Data Control Wizard with new options for scrolling and range paging as
well as defining a wrapper class for data control implementation code
Declarative Lists of Values (LOV)
Automatically call mergeEntity
Support CreateInsert and CreateWithParameters operations
Web Service Data Control Enhancements:
Support for all REST operations
Create a Web Service Data control from RESTful service URL
ADF Controller:
Pretty URLs: In this release, the ADF Controller state information is no longer included in the
URL whenever possible.
Unauthorized Region Taskflow: Allows the developer to specify a "fallback" bounded task
flow to be shown in case the user is not authorized to access the current one.
Recursive bounded task flows Support for calling bounded task flows recursively. In previous
versions, the view layer did not detect that the view activity had occurred and did not re-
render the region.
52/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
53/54
ADF Essentials Training by Deepak Bhagat
Oracle Application Development Framework (ADF) Questions and Answers
28 Advance Topics
184. What is the contextual event, explain with a diagram?
The contextual event, in simple terms, is a way to communicate between task flows. Sometimes
we have task flow open in a region and have to get some values from that task flow. This scenario
can be achieved by the contextual event.
Contextual Event has two parts:
Publisher Event (Producer)- As button or any component that can raise an event
Handler Event (Customer)- that listens and process event published by the producer
54/54
ADF Essentials Training by Deepak Bhagat