« July 2008 | Main | October 2008 »

September 2008 Archives

September 28, 2008

How to create Static Columns and use in UI - ADF 10.1.3.3

Consider Employee View Object of HR Schema having predefined columns in it as shown below, create a transiant column "SalaryRange" that act as virtual column to hold static SalaryRange values in it.

Model View Object :

transiant.GIF

Page Def Changes :

transiant1.GIF

Create method in Application module and add below code in it.

public void salaryRange () {
ViewObject vo = findViewObject("EmployeesView");
RowSetIterator iter = vo.createRowSetIterator(null);

while (iter.hasNext()) {
Row row = iter.next();
String status="";
if( Integer.parseInt(row.getAttribute("Salary").toString()) > 5000)
status = "High";
else
status = "low";

row.setAttribute("SalaryRange", new String(status));
}

iter.closeRowSetIterator();
getDBTransaction().commit();
}

User Interface with salaryRange column values :

transiant2.GIF

About September 2008

This page contains all entries posted to Raghu Yadav's Weblog in September 2008. They are listed from oldest to newest.

July 2008 is the previous archive.

October 2008 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle