Skip to main content

ADF Interview Questions and Answers

1. 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.

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

DataBindings.cpx : It 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.

JDeveloper creates this file the first time you bind data to a UI component.

DataControls.dcx  : It contains information needed to initialize the data control to work with a particular service (JavaBean, EJB, XML, Webservice and so on). JDeveloper creates this file the first time you create data control i.e 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.

3. What is the difference between trinidad.config and trinidad.skins?

trinidad.config file is created when you create a webcenter portal application. This is used to register the skin-family you are going to use for your entire application. Trinidad.skins is used when we use skin as a Jar file. This file provides a mapping between the Skin Id and the actual path where the skin exists.

4. What is binding context and binding container?

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. 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.

5. What are the different types of bindings in ADF?           ADF contains the following types of bindings:
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}

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}

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.

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

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.

6. What is the difference between an action and an action listener?

Actions are designed for business logic and participate in navigation handling, whereas action listeners typically perform user interface logic and do not participate in navigation handling.


Basically the "action" attribute refers to an action method which returns a String from which the Faces navigation model can use to decide whether or not a navigation is necessary based on the value of the string.
An actionlistener method compared to an action method does not return a String. Instead it returns void. It is basically identical to the action method but instead it just executes the code after an action event (button click or link click) but a navigation is not needed.

Action listener is a class that wants to be notified when a command component fires an action event.

7. What is a view scope?

A view-state allocates a new viewScope when it enters. This scope may be referenced within the view-state to assign variables that should live for the duration of the state. This scope is useful for manipulating objects over a series of requests from the same view.

8. 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 a criteria.

9. How do you define pagination in adf?

We define custom pagination in ADF by creating a custom table as a taskflow using the af:iterator tag. This renders the collection of data just as a table renders it. Now we bind the value property of iterator to collection model from ADF bindings declaration and set the number of visible row to, say 15.

For more details refer :- More on Pagination

10. What are validaters and converters?
validaters and Converters are used to provide conversion and validation capabilities to the ADF input components respectively.
Converters convert the values on ADF forms to the type in which the application accepts them after the values are edited on the form and submitted.
validaters are used to impose validations on the input components.

11. What is the life cycle of JSF?




Restore View : The request comes to the FacesServet controller which extracts the viewed from this request.
Apply request values: 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.
Process validations: This phase makes use of the validaters to validate the validation rules on the fields..
Update model values: In this phase JSF updates the actual values of the server-side model ,by updating the properties of your backing beans.
Invoke application: Here the JSF controller invokes the application action to handle Form submissions.
Render response: In this phase JSF displays the view with all of its components in their current state.

12. What is the difference between setting an immediate=true on a button and immediate=true on a text field? 


ADF Rich Client components have an immediate attribute. If a component has its immediate attribute set toTRUE (immediate="true"), then the validation, conversion, and events associated with the component are processed during the applyRequestValues phase.

When immediate is true on a button, the command’s action and ActionListeners, including the default ActionListener provided by the JavaServer Faces implementation, will be executed during Apply Request Values phase of the request processing lifecycle, rather than waiting until the Invoke Application phase.

In case of a text field, by default, values are converted and validated together in the Process Validaters phase. However, if you need access to the value of a component during Apply Request Values – for example, if you need to get the value from an actionListener on an immediate commandButton – then setting this to "immediate" makes that possible.


13. What is inter-portlet communication?                        Inter-portlet communication is achieved when an action in one portlet triggers a response in the second portlet. Its a communication bridge between two portlets. For eg one portlet contains a checkbox containing list of products. When i choose a product from the list and click on submit, the other portlet displays the details of the respective product.

14.What is meta data commit during life cycle phase of adf what happens here                       The metadata changes are written to the MDS repository after the JSF Invoke Application phase in JSF life cycle.

15.In 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 the runtime settings so the ViewController layer knows how to make use of it.

16.What are Contextual events

Contextual event ,in simple terms is a way to communicate between taskflows. Sometimes we have taskflow open in a region and have to get some values from that taskflow .This scenario can be achieved by contextual event.

Contextual Event have two parts-
Publisher Event (Producer)- As button or any component that can raise event
Handler Event (Customer)- that listens and process event published by producer


  Download contextual event doc
 



17.What are various components in ADF ?

Oracle ADF has following components

  • ADF Business Components: VO, EO & AM
  • ADF Model : DataBinding (.cpx, .xml) & DataControls(.dcx)
  • ADF View: JSP, JSF, ADF Faces etc.
  • ADF Controller: Task flows (adf-config.xml), faces-config.xml 
18. In which xml do you configure the skin for your framework application?
   in trinidad-config.xml file


19. 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.

20. 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. 


21.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();
 
  
22.In which xml do you configure the skin for your framework application.

  - trinidad-config.xml

 


Comments

  1. This is excellent stuff request you to please provide more!

    ReplyDelete
  2. Hi Rahulabh,
    These are common questions which you will face in any ADF interview.
    Beyond that they will ask you about scenario's,for which you need to answer based on your experience.But still i try to upload some more documents.

    ReplyDelete
  3. Hey Sachin

    Superb ... Excellent questions . Need to ask you more in person :)

    ReplyDelete
  4. need some more info on contextual events sachin ji

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. I updated post see last point, and download attachment

    ReplyDelete

Post a Comment

Popular posts from this blog

Passivation and Activation in ADF (Application Module )

1. For performance reasons, ADF keeps a pool of application modules in memory. It tries to give each session the same application module as the session used during the last request; however, this might not be possible during peak load of your application. 2. In this case, ADF saves the application modules state in a database table so the application module can be used by another session. This is called passivation . 3. When the first session needs the application module again, its state is retrieved from the database process known as activation . 4. If you have made an error in your code and depend on some variable that is not persisted correctly when your application module state is stored, you will experience mysterious errors under high load.   Enable/Disable Application Module Pooling : Right-click on your application module, choose Configurations.By default, each application module has two configurations. Ensure that the one ending in …Local is selected and then click

Get modified rows from Entitiy Cache

To get the modified rows from entity cache we have getEntityState() method at EntityImpl class. Refer to my previous blog  Accessing EO impl methods from VO impl  where i am overriding the getEntityState() in EOimpl and calling it in VOImpl. We can use methods written or overridden in VOImpl class to AMImpl class. There are different states associated with an entity object. STATUS_UNMODIFIED STATUS_MODIFIED STATUS_NEW STATUS_DELETED STATUS_DEAD We have to check the state or row in our AmImpl class by using the VOImpl method and through this we can distinguish the rows present at vo. Add below code in AMImpl class along with my previous post. public void geCachedRowsCount(){         JobsVOImpl jobsVo = (JobsVOImpl)this.getJobsVO();         RowSetIterator iter = jobsVo.createRowSetIterator(null);             while(iter.hasNext()){             Row row = iter.next();             byte state = jobsVo.getEntityState(row);             System.out.println("Job_id -&

The file store "WLS_DIAGNOSTICS" could not be opened

WLS_DIAGNOSTIC ERROR weblogic.store.PersistentStoreException: [Store:280073]The file store "WLS_DIAGNOSTICS" could not be opened because it contained a file with the invalid version 1. A file of version 2 was expected. When you get this error while running your application on internal weblogic server delete the following file WLS_DIAGNOSTICS000000.DAT search the file in following path C:\jdev_work\system11.1.1.5.37.60.13\DefaultDomain this file is in DefaultDomain folder of your jdev. and delete the WLS_DIAGNOSTICS000000.DAT file . and run your applicatuon