Category Archives: J2EE

How to create your custom ExceptionHandler in Oracle ADF

Steps: Create a Java class that extends Create a textfile with the name “” (without the quotes) and store it in .adf\META-INF\services (you need to create the “services” folder) In the file, add the absolute name of your custom … Continue reading

Posted in Oracle ADF | Tagged , , | Leave a comment

Various Scopes in Oracle ADF

Various Scopes in Oracle ADF: Scope Description application The application scope lasts until the application stops. Values that you store in a managed bean with this scope are available to every session and every request that uses the application. Avoid … Continue reading

Posted in Oracle ADF | Tagged , , | Leave a comment

Creating a re-organizable list of Items using Drag and Drop in Oracle ADF

Sometimes the requirement is to create a list of UI Items which can be rearranged using Drag and Drop in Oracle ADF, similar to the one in jQuery. Oracle ADF Drag and Drop doesn’t provide the ability to identify, where … Continue reading

Posted in Oracle ADF | Tagged , , , , , , , | 1 Comment

ADF – Displaying Multi-Line Text with outputText Component

To display multi-line text, the basic idea is applying the white-space CSS property to the element with one of following values: pre, pre-wrap and pre-line. This property controls the processing of whitespace inside an element. The exact value you need … Continue reading

Posted in CSS, Oracle ADF | Tagged , , , | Leave a comment

How to create multilevel menu’s in JSP using recursion..

There was a requirement where in I need to create multi-level menu’s in a JSP A role has certain set of Privileges.Each privilege may or may not have child privileges.. Where Privilege has child privileges, it was desired to display … Continue reading

Posted in JSP | Leave a comment

How to implement a self join in hibernate

Source : We have a create table in the database. CREATE TABLE employee (employee_id NUMBER(10) NOT NULL,firstname VARCHAR2(50) NULL DEFAULT NULL,lastname VARCHAR(50) NULL DEFAULT NULL,manager_id NUMBER(10) NULL DEFAULT NULL,PRIMARY KEY (’employee_id’),CONSTRAINT ‘FK_MANAGER’ FOREIGN KEY (‘manager_id’) REFERENCES ’employee’ (’employee_id’)); Here … Continue reading

Posted in Hibernate | Leave a comment

How to integrate Spring and Hibernate

Here are the few tips I have gathered on how to integrate spring and hibernate. Create your bean.xml something like this… ${db.driverClassName} ${db.url} ${db.username} ${db.password}com.usermanagement.pojo.Usercom.usermanagement.pojo.Rolecom.usermanagement.pojo.Privilegecom.usermanagement.pojo.Passwordcom.usermanagement.pojo.PasswordPolicy org.hibernate.dialect.Oracle10gDialectupdatetruetrue <!–org.hibernate.cache.SingletonEhCacheProvider–>org.hibernate.cache.EhCacheProvider The list of jars that you might need are antlr-2.7.6.jar asm-1.5.3.jar axis2-spring-1.6.1.jar … Continue reading

Posted in Hibernate, Spring | Leave a comment

Create Declarative Component with Modal

Originally posted on Middleware by Link Consulting:
During an ADF application development sometimes you probably find yourself doing the same set of specific components more than once in different pages or even in the same page. If you are facing…

Posted in Oracle, Oracle ADF | Tagged , , , , , | 1 Comment

Applying Programmatically View Criteria based on Like “%String%” and with IN Clause in Oracle ADF

Use the method below code to apply a view criteria programmatically that has IN clause and Like clause: //Retrieving application module String filterList=”Comma,Separated,List” ApplicationModule applicationModule = Configuration.createRootApplicationModule(“”,”AppModuleLocal”); //retrieving view object ViewObjectImpl vo = (ViewObjectImpl)applicationModule.findViewObject(“”); //creating a view criteria ViewCriteria criteria … Continue reading

Posted in Oracle ADF | Tagged , , , | Leave a comment

ADF – Programatically Applying and Creating View Criteria

Apply an existing View Criteria Programmatically: public void applyViewCriteria(ViewObjectImpl vo,HashMap criterias) { ViewCriteria vc = vo.getViewCriteria(“ViewCriteriaName”); vo.applyViewCriteria(vc); Iterator i = criterias.keySet().iterator(); String key=””; while (i.hasNext()) {; vo.setNamedWhereClauseParam(key, criterias.get(key)); } vo.executeQuery(); } Create a View Criteria Programmatically: public void createViewCriteria(ViewObjectImpl … Continue reading

Posted in Oracle ADF | Tagged | Leave a comment