Skip to main content

Posts

Oracle ADF Interview questions

Why ADF ?     Oracle ADF (Application Development Framework) is state of the art technology to rapidly build enterprise application. ADF is a mature J2EE development framework and many other products under Oracle Fusion Middleware stack are build upon ADF 11g. ADF provides variety of inbuilt components that minimizes the need to write code allowing users to focus more on features and business aspects of the application. With WebCenter and SOA plugins, we can also integrate WebCenter Services and SOA into your application making it rich and extensible. Explain about JSF lifecycle ? The six phases of the JSF application lifecycle are as follows (note the event processing at each phase): -Restore view -Apply request values; process events -Process validations; process events -Update model values; process events -Invoke application; process events -Render response Immediate=true : A command button that does not provide ...

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

input string validation in adf

Following code in your <af:inputText tag will estrict the values entered by user as per your requirement. Validating a InputTextBox for String Value Only <af:validateRegExp pattern="^[a-zA-Z]+$" messageDetailNoMatch="Number Not allowed" /> allowing only string with space  -->   <af:validateRegExp pattern="^[a-zA-Z  a-zA-Z]+$" messageDetailNoMatch="Number Not allowed" />   it will allow only charecters and not numbers.  

Partial Submit , Auto Submit in ADF

Partial Submit   A partial submit actually is a form submit that does not require a page refresh and only updates components in the view that are referenced from the command component   PartialTriggers   property. Another option for refreshing a component in response to a partial submit is call following code in a managed bean. AdfContext.getCurrentInstance.addPartialTarget ( component_instance ) AdfFacesContext.getCurrentInstance.addPartialTarget ( Component_binding )   If a form contains required fields that the user left empty invoking the partial submit, then errors are shown for each of the field as the full form gets submitted.   ADF Faces adds the concept of partial form submit to JavaServer Faces 1.2 and beyond Auto Submit An input component that has its   autosubmit   property set to true also performs a partial submit of the form. However, this time it doesn't submit the entire form but only the component that triggers the ...

Getting DB Connection in Bean/Servlet

Using the following method you will get the connection in your Bean/Servlet for your requirement. For this you just need one parameter from your Server that is the DataSource Name. use the following code in your  Bean/Servlet import javax.naming.Context; import javax.naming.InitialContext; private Connection getDBConnection() {         Context ctx;         Connection conn = null;         try {         ctx = new InitialContext();         DataSource ds;         ds = (DataSource)ctx.lookup("java:comp/env/jdbc/ xyzDS ");         conn = ds.getConnection();         } catch (Exception e) {         // TODO: Add catch code      ...

Resetting component values in actionEvent

       actionEvent is the event on which you want to reset the component values to null or clear the previous values in popup or UIComponent. For that use the following code.    UIComponent comp = actionEvent .getComponent();    oracle.adf.view.rich.util. ResetUtils.reset(comp); here comp is the component binding .

Getting Businss days in JAVA/ADF

Use the following class in your application to get the Business days getBusinessDateAdded   - is the method which will accept the number of daya of future ,and second parameter is the DB connection as here i am using the DB query direct to get the holidays. you can customise this as per your need package org.adr.prism.casemgt.ui.bean; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang.time.DateUtils; /* This bean is used to get the business days on the given oracle domain date  * 04-Julu-2013  * @sachin  */ public class BusinessDays {     public BusinessDays() {         super(...