Top 25+ ADF Interview Questions & Answers [ ORACLE TRICKS ]
Oracle ADF Interview Questions and Answers

Top 25+ ADF Interview Questions & Answers [ ORACLE TRICKS ]

Last updated on 04th Jul 2020, Blog, Interview Questions

About author

Mohan (Lead Data Engineer - Director Level )

(5.0) | 16547 Ratings 5142

The Oracle Application Development Framework (Oracle ADF) is an end-to-end application framework that builds on J2EE standards and open-source technologies to simplify and accelerate implementing service-oriented applications. If you develop enterprise solutions that search, display, create, modify, and validate data using web,wireless, desktop, or web services interfaces, Oracle ADF can simplify your job. Used in tandem, Oracle JDeveloper 10g and Oracle ADF give you an environment that covers the full development lifecycle from design to deployment, with drag-and-drop data binding, visual UI design, and team development features built-in.

1) What is Oracle ADF?


Oracle ADF is an commercial java/j2ee framework, which is used to build enterprise applications.

It is one of the most comprehensive and advanced framework in market for J2EE

2) What are the advantages of using ADF?


Following are the advantages of using ADF:

  • It supports Rapid Application Development.
  • It is based on MVC architecture
  • Declarative Approach (XML Driven)
  • Secure
  • Reduces maintenance cost and time
  • SOA Enabled

3) What are various components in ADF?


 Oracle ADF has following components

  • ADF Business Components(Model)
  • ADF Faces (View)
  • ADF Task flows(Controller)

4) What is the return type of Service Methods?


Service Methods can return Scalar or Primitive Data types.

5) Can Service Methods return type Void?


Yes, Service Methods can Return type Void

6) Can Service Methods return Complex Data types?


 No, service methods can return only primitive/scalar data types.

7) Which component in ADF BC manages transaction ?


Application Module, manages transaction.

8) Can an entity object be based on two Database Objects (tables/views) or two Web services ?


No entity objects will always have one to one relationship with a database object or web service.

9) Where is that we write business rules/validations in ADF and why?


We should be writing validations at Entity Object level, because they provide highest degree of reuse.

10) What is Managed Bean?


Managed bean is a java class, which is initialized by JSF framework. It is primarily used to hold view and controller logic. It is also used to execute java code to be executed on a user action like Button Click.

11) What are Backing Bean?


Backing beans are those managed beans which have 1:1 mapping with a page. They have getters and setters for all the components in the related page.

12) What is difference between managed and backing beans?


Backing bean has 1:1 relation with page whereas managed beans can be used in multiple pages.
Backing beans scope is limited to the page whereas managed beans can have other scopes too.

13) What is a Task flow?


Task flow is the controller of an ADF application, it provides us an declarative approach to define the control flow.  It is used to define the navigation between pages and various task flow activites.

14) What are the different types/categories of Task flows ?


Task flows are of two categories: Bounded and Unbounded.

15) What is the difference between Bounded and Unbounded task flows?


Differences between Bounded and Unbounded task flows :

  • Bounded task flows can be secured but Unbounded can’t.
  • Bounded taskflows can accept parameter and return values but unbounded taskflows don’t support parameters
  • Bounded taskflows has a single entry point or a default activity but unbounded taskflows have multiple entry points.
  • Bounded taskflows can be called from other bounded/unbounded taskflows but unbounded cannot be called or reused.
  • Bounded taskflows support transactions unbounded don’t

16) What are the various access scopes supported by ADF?


ADF Faces supports the following scopes

  • Application Scope
  • Session Scope
  • PageFlow Scope
  • Request Scope
  • Backing Bean Scope.

17) Describe life cycle of a ADF Page?


ADF page is an extension of JSF and has following phases in its lifecycle

  1. Initialize Context: In this phase the adf page initializes the LifecycleContext with information that will be used during the Lifecycle.
  2. Prepare Model:  In this phase ui model is prepared and initialized. In this phase page parameters are set and methods in the executable section of the page definition of the ADF page are executed.
  3. Apply Input Values: This phase handles the request parameters. The values from the HTML are sent to the server and applied to the page binding in page definitions.
  4. Validate Input Values:  This phase validates the values that were built in the Apply input values phase
  5. Update Model:  Validated values supplied from user are sent to ADF business components data model
  6. Validate Model Updates:  In this phase the business components will validate user supplied values.
  7. Invoke Application:  This phase will process the ui events stack built during the life cycle of page and also fire navigational events
  8. Prepare Render:  This is the final phase where HTML code is generated from the view tree.

18) 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 a HTML Page, without refreshing the complete page.
It is enabled by.

  • Setting AutoSubmitproperty to true on the triggering element.
  • Setting the PartialTriggersproperty of target component to refer to component id of the triggering element

19) What is Action Listener?


An action listener is a class that wants to be notified when a command component Fires an action event. An action listener contains an action listener method that processes the action event object passed to it by the command component.

20) What are businesses Component In ADF.?


All of these features can be summarized by saying that using ADF Business Components for your J2EE business service layer makes your life a lot easier. The key ADF Business Components that cooperate to provide the business service Implementations are:

  • Entity Object
  • Application module
  • View object

    Subscribe For Free Demo

    21) Describe Entity Object


     An entity object represents a row in a database table and simplifies modifying its data by handling all DML operations for you. It can encapsulate business logic for the row to ensure your business rules are consistently enforced. You associate an entity object with others to reflect relationships in the underlying database schema to create a layer of business domain objects to reuse in multiple applications.

    22) Describe Application Module


    An application module is the transactional component that UI clients use to work with application data. It defines an up datable data model and top-level Procedures and functions (called service methods) related to a logical unit of work Related to an end-user task.

    23) Describe View Object


    A view object represents a SQL query and simplifies working with its results. You use the full power of the familiar SQL language to join, project, filter, sort, and Aggregate data into exactly the “shape” required by the end-user task at hand. This Includes the ability to link a view object with others to create master/detail Hierarchies of any complexity. When end users modify data in the user interface, Your view objects collaborate with entity objects to consistently validate and save the changes.

    24) What is Top Link?


    Top Link is an Object-Relational Mapping layer that provides a map between the Java objects that the model uses and the database that is the source of their data. By default, a session is created named default. In the following steps, you create a new session.

    25) Difference between Backing Bean and Managed Bean?

    Backing Beans Managed Beans
    A backing bean is any bean that is referenced by a form. A managed bean is a backing bean that has been registered with JSF (in faces-config.xml) and it automatically created (and optionally initialized) by JSF when it is needed.
    The advantage of managed beans is that the JSF framework will automatically create these beans, optionally initialize them with parameters you specify in faces-config.xml,
    Backing Beans should be defined The managed beans that are created by JSF can be stored within the request, session, or application scopes

    26) What do you mean by Bean Scope?


     Bean Scope typically holds beans and other objects that need to be available in the different components of a web application.

    27) What are the different kinds of Bean Scopes in JSF?


    JSF supports three Bean Scopes. Viz.,

    • Request scope
    • Session scope
    • Application scope

    28) Define Request Scope.


    The request scope is short-lived. It starts when an HTTP request is submitted and ends when the response is sent back to the client.

    29) Define Session Scope.


    The session scope persists from the time that a session is established until session termination.

    30) Define Application Scope.


    The application scope persists for the entire duration of the web application. This scope is shared among all the requests and sessions.

    Course Curriculum

    Get Oracle ADF Training from TOP-Rated Instructors

    • Instructor-led Sessions
    • Real-life Case Studies
    • Assignments
    Explore Curriculum

    31) What is the difference between JSP-EL and JSF-EL?

    In JSP-EL the value expressions are delimited by ${…}. In JSf-EL the value expressions are delimited by #{…}.
    The ${…} delimiter denotes the immediate evaluation of the expressions, at the time that the application server processes the page. The #{…} delimiter denotes deferred evaluation. With deferred evaluation, the application server retains the expression and evaluates it whenever a value is needed.

    32) How to declare the page navigation (navigation rules) in faces-config.xml file in ADF 10g?


    Navigation rules tells JSF implementation which page to send back to the browser after a form has been submitted. We can declare the page navigation as follows:

    • /index.jsp
    • login
    • /welcome.jsp

    This declaration states that the login action navigates to /welcome.jsp, if it occurred inside /index.jsp.

    33) What are the JSF life-cycle phases?


    The six phases of the JSF application lifecycle are as follows (note the event processing at each phase):

    1. Restore view
    2. Apply request values; process events
    3. Process validations; process events
    4. Update model values; process events
    5. Invoke application; process events
    6. Render response

    34) Explain the Restore View in the life-cycle phase of JSF.


    A request comes through the FacesServlet controller. The controller examines the request and extracts the view ID, which is determined by the name of the JSP page.
    Start creating direct paths to that data that you need.

    35) Explain the Apply request values in the life-cycle phase of JSF.


    The purpose of the apply request values phase is for each component to retrieve its current state. The components must first be retrieved or created from the FacesContext object, followed by their values.

    36) Explain the Process validations in the life-cycle phase of JSF.


    In this phase, each component will have its values validated against the application’s validation rules.

    37) Explain the Update model values in the life-cycle phase of JSF.


    In this phase JSF updates the actual values of the server-side model ,by updating the properties of your backing beans

    38) Explain the Invoke application in the life-cycle phase of JSF.


    In this phase the JSF controller invokes the application to handle Form submissions.

    39) Explain the Render response in the life-cycle phase of JSF.


    In this phase JSF displays the view with all of its components in their current state.

    40) What is setActionListener?


    SetActionListener – The setActionListener tag is a declarative way to allow an action source ( , , etc.) to set a value before navigation. It is perhaps most useful in conjunction with the “process Scope” EL scope provided b ADF Faces, as it makes it possible to pass details from one page to another without writing any Java code. This tag can be used both with ADF Faces commands and JSF standard tags.

    Example of this can be as follows. Suppose we have a table “employee”. We want to fetch the salary of an employee of some particular row and want to send this salary in Next page in process scope or request scope etc.So using this we can do this.

    It have two attributes:

    • From – the source of the value; can be an EL expression or a constant value
    • To – the target for the value; must be an EL expression
    • to=”#{processScope.salary1}”/>

    This setActionListener will pick value of salary of that row and store this value into salary1 variable.So anyone can use this salary As processScope. salary1 . It is very simple to use. And very useful.

    41) Can an entity object be based on two Database Objects(tables/views) or two Webservices?


    No, Directly its not possible to create EO using multiple tables. Entity objects will always have one to one relationship with a database   object or web service.  But using views you can create Entity Objects on multiple tables.

    42) What is Control Hints in Entity Object configuration?


    Control hints are associated with the current view or entity attribute. All view objects inherit the hint values at run time. Control hints for data controls and bindings, including: Labels, Date & currency formatting.

    43) View Link is an active link between view objects.You can create view links by providing the Source & destination VO attributes.


     Oracle ADF view links are business components that define a relationship between two Oracle ADF view object definitions (the “source” and “destination” view objects) based on sets of view attributes (the “source” and “destination” attributes) from each. These can range from simple one-to-many relationships to complex many-to-many relationships. This allows you to easily create master/detail relationships between data controls in the client. For example, creating a view link between view objects will allow you to create relationships between:

    • A dropdown list for selecting a customer and a table displaying that customer’s orders
    • The nodes in a tree control and their respective children
    • An HTML page containing two frames: one that allows the user to browse for items and the other that lists the wherehouses in which the selected item is stored

    View Links can be created using:

    • Two View objects
    •  Based on EO Association

    View Links and Queries
    A view link definition relates two view object definitions. In the vast majority of cases, the view object definitions will contain SQL queries that access a database, and the view link definition will relate those queries using a parametrized WHERE clause, which is appended to the destination view object’s query and resolved using the values of source attributes.
    For example, suppose you had the following view object definitions:

               ·  CustomersView, containing the query:


      OrdersView, containing the query:


      You could create a view link, CustOrdLink, with

      ·         CustomersView’s CustomerId attribute as its source attribute

      ·         The parametrized WHERE clause


      You could then use CustOrdLink conjunction with a row from CustomersView (for example, the row for Customer 101) and all of OrdersView to return the rows from the query


      JDeveloper will create the parametrized query for you based on the attributes you select. If you do not change this query, you can make the view link bidirectional. This will switch the roles of the source and destination attributes. For example, if you make CustOrdLink bidirectional, you can use it in conjunction with a row from OrdersView (for example, a row for an order placed by Customer 101) and all of CustomersView to return the rows from the query


      44) Can you make View Link bidirectional?


      Yes, you can make a view link bidirectional. It’s handled by view link query. View Links created on Association are also bidirectional.

      45) How to create read only VO?


      While creating View select below marked option A view is read-only if it does not have Primary Keys or if all its entity references are reference-only.

      46) Is EO to EO association possible like VO? If yes how?


      è  Direct EO-EO association is possible.In Jdeveloper select option ‘New Association’, Give name to association, select attributes in source & destination Eos.

      • One-to-many relationships based on foreign keys.
      • A single many-to-many association corresponds to two foreign key relationships
      • A one-to-many relationship between the source table and a third table, the intersection table
      • A one-to-many relationship between the destination table and the intersection table.

      47) What is policy store and identity store in OID?


      Identity Store is used to store information about users and groups while the Policy Store is used to store information about security policies.

      48) What is the difference between databindings.cpx and datacontrol.dcx?


      The DataBindings.cpx file contains the Oracle ADF binding context for your entire application and provides the metadata from which the Oracle ADF binding objects are created at runtime.

       The DataControls.dcx file is created when you register data controls on the business services. This file is not generated for Oracle ADF Business Components. It identifies the Oracle ADF model layer data control classes(factory classes) that facilitate the interaction between the client and the available business service.

      49)  What is binding context?


      Binding context is a runtime map between the data controls and page definition of pages in the application which is used to access the binding layer. It is accessible through the EL expression in your jspx pages.

      50) What is binding container?


      Binding container is a request-scoped map that is used to instantiate the page bindings. This is accessible through the EL expressions. Also, since it is request-scoped map, it is accessible during every page request.

      Course Curriculum

      Enroll in Oracle ADF Training Course Led By Industry Experts

      Weekday / Weekend BatchesSee Batch Details

      51) What are the different types of bindings in ADF?


      • Method Bindings
      • Attribute Bindings
      • Tree Bindings
      • Action Bindings
      • Iterator Bindings

      52) Define Method Bindings.


      This binding is used when you want to use custom methods to be executed.

      53) Define Attribute Bindings.


      This is the binding to retrieve the value of a single view attribute in the iterator binding’s current view row.
      For eg;

      • #{bindings.CustomerId.InputValue}

      54) Define Tree Bindings.


      This is used for tables, tree-tables and trees. It is used to expose rows of a  table in the iterator binding’s current range.
      Eg; All Customers-

      • #{bindings.AllCustomers.labels.CustomerId}

      55) Define Action Bindings.


      This binding type is used when buttons or command links are dropped on the user interface and require an action to be performed on them. We can use data control operations on them, for eg, Create, Delete, First, Last, Commit, Rollback etc.

      56) Define Iterator Binding.


      This binding is created by the application to access the ADF binding context. It contains a reference to the page bound data collection, helps access it and iterates over its data objects.

      57) What is the purpose of adfc-config.xml?


      The adfc-config.xml file is the configuration file for an ADF unbounded task flow. This file contains metadata about the activities and control flows contained in the unbounded task flow.

      58) What is the purpose of faces-config.xml?


      Use the faces-config.xml file to register a Framework application’s resources, such as custom validators and managed beans, and to define all page-to-page navigation rules.

      59) In which xml do you configure the skin for your framework application?



      60) How do you decide whether the application should be deployed as an EAR or a WAR?


      If the application contains run-time customizations using MDS, it must be bundles as an EAR. For simple webcenter portal application with no such customizations, WAR can be created.

      61) What is the purpose of jazn-data.xml?


      This file is used for defining the permissions and privileges for various groups of users on various taskflows created in the application.

      62) When we drag drop VO from DataControl which binding occurs?


      Value binding occurs.

      63) Explain Data Control Palette hierarchy


      Data Control Palette hierarchy:The Data Control Palette displays two types of actions:

      • Actions that typically operate on all data collections in the current web page’s binding context (such as Commit and Rollback) in the Operations folder at the root level of the hierarchy.
      • Operations on a specific data collection (for example, MyView1). Data collection-specific operations (such as Create and Delete) appear in the Operations folder as child nodes of the collection in the Data Control Palette.

      64) 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();

      You have to change the iterator name ‘EmployeesViewIterator’ to the name of your VO iterator (look it up in the page bindings) and the classes Employees.

      65) How many types of VOs we can create in Oracle ADF?


      There are four types of VOs we can create as shown in below image, select radio button & create VO.

      1. Updatable VO (Updatable access through entity objects) – Here EO need to be created for  updatable VOs.

      2. Read only VO (Read-only access through SQl query) – No need to create EO, VOs can be created using SQL queries, table, or views.

      3. Rows populated pro-grammatically, not based on query – This is also read-only view. Here add one or more attributes to use in program. In the Attribute Settings page, adjust any setting you may need to for the attributes you defined.

      4. Static VO (Rows populated at design time- Static List): You use the Create View Object wizard to create static view objects. The wizard lets you define the desired attributes (columns) and enter as many rows of data as necessary. The wizard displays the static data table as you create it.

      You can also use the Create View Object wizard to create the attributes based on data from a comma-separated value (CSV) file format like a spreadsheet file. The wizard will attempt to create the attributes that you define in the wizard with data from the first row of the flat file. 

      Check below image- circled import option is to import comma separated .cvs file or other file.

      Oracle ADF Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

      66) Can we change DB connection for any particular AM?


      YES, follow steps to change DB connection:

      • Double click on AM.
      • GO to the configuration tab, click on configuration file bc4j.xml
      • Here we have attribute JDBCName under element AppModuleConfig, change the connection which is created for other DB.

      67) What is view criteria, how can you change view criteria at runtime?


      View Criteria: View criteria are structured criteria that you can use to create searches.

      View criteria are collections of view criteria rows. A view criteria row specifies query-by-example requirements for one or more view object attributes. A view row matches if it meets all of the requirements.

      When you apply view criteria to a view object instance, the query is restricted to return those view rows that match at least one of the view criteria rows. Effectively, therefore, view criteria assemble a WHERE clause in conjunctive normal form: the WHERE clause is a disjunction of conjunctions of query-by-example requirements.

      View criteria are implemented by the class –  oracle.jbo.ViewCriteria; 

      view criteria rows, by the classoracle.jbo.ViewCriteriaRow.

      View criteria is like querying a SQL query.

      Sometimes you need dynamic ViewCriteria that you can handle at runtime ,

      here is the solution ,you can create and apply ViewCriteria Programmatically:
      Sample UseCase-

      • Suppose you have Department VO
      • You want to filter this VO for DepartmentId 10
      • Do this using this code snippet
      • /**Get ViewObject*/
      • ViewObject vo = getAm().getDepartments1();
      • /**Create ViewCriteria on ViewObject*/
      • ViewCriteria vc = vo.createViewCriteria();
      • /**Create ViewCriteriaRow for that Criteria*/
      • ViewCriteriaRow vcRow = vc.createViewCriteriaRow()
      • /**Set the values for ViewCriteriaRow*/
      • vcRow.setAttribute(“DepartmentId”, 10);
      • /**Add row to ViewCriteria*/
      • vc.addRow(vcRow);
      • /**Apply Criteria on ViewObject*/
      • vo.applyViewCriteria(vc);
      • /**Execute ViewObject*/
      • vo.executeQuery();
      • public pcAMImpl getAm()
      • {
      • pcAMImpl am = (pcAMImpl)resolvElDC(“pcAMDataControl”);
      • return am;
      • }

      68) How can you manage transaction in ADF?


      We can manage transaction using Application Module, different Application Modules, Bounded Task Flows & at ADF Data Control Level.

      69) What is Bundled Exception Mode in ADF?


      An application module provides a feature called bundled exception mode which allows web applications to easily present a maximal set of failed validation exceptions to the end user, instead of presenting only the first error that gets raised. By default, the ADF Business Components application module pool enables bundled exception mode for web applications.

      You typically will not need to change this default setting. However it is important to understand that it is enabled by default since it effects how validation exceptions are thrown. Since the Java language and runtime only support throwing a single exception object, the way that bundled validation exceptions are implemented is by wrapping a set of exceptions as details of a new “parent” exception that contains them. For example, if multiple attributes in a single entity object fail attribute-level validation, then these multiple ValidationException objects will be wrapped in a RowValException. This wrapping exception contains the row key of the row that has failed validation. At transaction commit time, if multiple rows do not successfully pass the validation performed during commit, then all of the RowValException objects will get wrapped in an enclosing TxnValException object.

      When writing custom error processing code, you can use the getDetails() method of the JboException base exception class to recursively process the bundled exceptions contained inside it.

      70) What is <f:facet> ?


      This tag is used to add a facet to the component means this tag is used to add its child as a facet of the closest parent component.

      With the help of this tag we can add header and footer facet to the container component like panelGroup.

      Are you looking training with Right Jobs?

      Contact Us
      Get Training Quote for Free