
A clear cut introduction to Oracle ADF
CREATE TABLE CHOLA_TO_DO_ALL (
TO_DO_ID NUMBER(38,0) PRIMARY KEY,
TASK_NAME VARCHAR2(100) NOT NULL,
TASK_DESCRIPTION VARCHAR2(500),
DUE_DATE DATE,
PRIORITY VARCHAR2(10),
COMPLETED VARCHAR2(1),
CREATED_ON DATE,
CREATED_BY VARCHAR2(50),
MODIFIED_ON DATE,
MODIFIED_BY VARCHAR2(50),
VERSION_NUMBER NUMBER(38,0)
);
CREATE SEQUENCE CHOLA_TO_DO_SEQ START WITH 1;
(new oracle.jbo.server.SequenceImpl("CHOLA_TO_DO_SEQ",adf.object.getDBTransaction())).getSequenceNumber()
Build a Search Taskflow and Create Edit Task flow..Call the Create Edit task flow from the Search Task flow
Hands on Lab document is available as attachment
ALTER TABLE EMPLOYEES ADD ( REGION_ID NUMBER, COUNTRY_ID CHAR(2));
SELECT
DEPARTMENTS.DEPARTMENT_ID DEPARTMENT_ID,
DEPARTMENTS.DEPARTMENT_NAME DEPARTMENT_NAME,
count(1) Employee_Count
FROM
DEPARTMENTS,
EMPLOYEES
where DEPARTMENTS.DEPARTMENT_ID = EMPLOYEES.DEPARTMENT_ID
group by DEPARTMENTS.DEPARTMENT_ID,DEPARTMENT_NAME
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCBindingContainer;
import oracle.binding.OperationBinding;
public String Save() {
// Add event code here...
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
operationBinding.execute();
FacesContext ctx = FacesContext.getCurrentInstance();
FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_INFO, "Saved Successfully", "");
ctx.addMessage(null,fm);
return null;
}
In Managed Bean :
public String Save() {
// Add event code here...
DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
OperationBinding operationBinding = bindings.getOperationBinding("saveEmployee");
operationBinding.execute();
FacesContext ctx = FacesContext.getCurrentInstance();
FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_INFO, "Saved Successfully", "");
ctx.addMessage(null,fm);
return null;
}
In AM Impl :
public void saveEmployee() {
ViewObjectImpl vo = getEmployeesView1();
vo.getCurrentRow().setAttribute("Salary", 35000);
this.getTransaction().commit();
}
Create Method :
System.out.println("Create Method is called");
SequenceImpl sq = new SequenceImpl("EMPLOYEES_SEQ",this.getDBTransaction());
this.setAttribute("EmployeeId", sq.getSequenceNumber().intValue());
Remove Method:
this.setAttribute("Salary",new BigDecimal("10") );
DoDml Method:
if (operation == DML_INSERT)
System.out.println("DML Insert is called");
else if (operation == DML_UPDATE)
System.out.println("DML Update is called");
else if (operation == DML_DELETE)
{
System.out.println("DML Delete is called");
operation = DML_UPDATE;
}
In EmployeesViewImpl.java :
public void filterByShippingDept () {
final Integer departmentId = 50;
setWhereClause( " DEPARTMENT_ID = " + departmentId);
executeQuery();
}
Binding Change :
<methodAction id="filterByShippingDept" RequiresUpdateModel="true" Action="invokeMethod"
MethodName="filterByShippingDept" IsViewObjectMethod="true" DataControl="CustomCodeAMDataControl"
InstanceName="data.CustomCodeAMDataControl.EmployeesView1"/>
In DepartmentsViewRowImpl.java
public void applyRaise(BigDecimal raiseValue)
{
RowIterator rows = getEmployeesView();
while (rows.hasNext())
{
EmployeesViewRowImpl currentRow = (EmployeesViewRowImpl) rows.next();
currentRow.setSalary( currentRow.getSalary().add(raiseValue));
}
}
ALTER TABLE EMPLOYEES ADD (
CREATED_ON DATE,
CREATED_BY VARCHAR2(50),
MODIFIED_ON DATE,
MODIFIED_BY VARCHAR2(50),
VERSION_NUMBER NUMBER(38,0));
Master the latest stable version of Oracle ADF 12.2.1.2 – your gateway to building powerful enterprise applications.
Set up your development environment – install JDeveloper, configure Oracle XE, and navigate JDeveloper like a pro.
Boost productivity – speed up JDeveloper and streamline your workflow quickly.
Build full CRUD functionality (Create, Read, Update, Delete) and develop interactive ADF web applications.
Deploy your ADF applications to WebLogic Server for real-world scalability.
Integrate REST Web Services and secure them with ADF Security.
Work on a real-world Project Management App Case Study – apply your skills to a hands-on project effectively.
Learn best practices for optimising performance, debugging applications and improving security.
Why Take This Course?
Oracle ADF is a powerful framework for building enterprise-grade applications. This course provides a structured approach, guiding you from beginner to expert with real-world examples. Whether you're a developer, analyst, or IT professional, mastering ADF will give you a competitive edge in the job market.
This course includes step-by-step lessons, practical assignments, hands-on coding exercises, and expert guidance to reinforce your learning. By the end, you'll have the confidence to build, secure, and deploy enterprise applications efficiently.
Join now and start your journey as an Oracle ADF Developer today!