Skip to main content

Posts

Showing posts from 2013

Oracle ADF Business Components (ADF BC)

Q:What are Entity Objects? A: Entity objects are Data Access Objects (DAOs) that are responsible for persisting & caching data, validation, and encapsulating business rules. ·  Represent a database table or other data source. ·  Handles database caching. ·  Contains attributes representing the database columns. ·  Encapsulates attribute-level and entity –level validation logic. ·  Can contain custom business methods. Q : Can an entity object be based on two Database Objects(tables/views) or two Webservices? A : 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. Q.What is Control Hints in Entity Object configuration? A: 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. Q.What are View

ADF High Availability for clustered environment

In order for an ADF application to support High Availability in clustered environment with server fail over. The below steps must be followed in developing an ADF application. 1. All Manage Beans must implement Serializable. 2. UI component bindings must be declared in a bean with shorter scope (backing bean scope or request scope). 3. If it needs to be declared in Manage Bean with PageFlowScope (Not recommended) , please ensure you declare the binding as transient. 4. Any objects that are declared as an attribute in Manage Bean must be Serialized. 5.ADF component bindings can not support the Serializable.To make them support HA use the following code for component binding,getters and setters in pageFlowScope bean .   ex. Normal ADF code for binding,getters and setters will be as follows    Private RichSelectOneChoice partySelect       public void setPartySelect(RichSelectOneChoice partySelect) {             this.partySelect = partySelect;            }      public RichSe

Getting the components tree and setting values at runtime

In some scenario we need to get the chields and set some value or refresh the chield components. Following code is one example for that. 1.There is one RichPanelGroupLayout with following childerns       a)RichPanelFormLayout and it has two RichInputText  RichPanelGroupLayout pGrpLayout = this. cbPopPalGrpLayout ;             List pGrpLayoutList = pGrpLayout.getChildren();                         for(int i = 0 ; i < pGrpLayoutList.size() ; i++){                 if(i > 0){                     RichPanelFormLayout pfl = (RichPanelFormLayout)pGrpLayoutList.get(i);                     List pflList = pfl.getChildren();                     for(int j = 0 ; j < pflList.size();j++){                         if(j > 0){                             RichInputText rit = (RichInputText)pflList.get(j);                             rit.setValue(null);                             rit.setSubmittedValue(null);                         }                                       

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 any navig

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) t

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 submit plus components referen

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         e.printStackTrace();         }         return conn;     } xyzDS -> is the DataSource Name.