« Calculated Columns cannot be Updateable - ADF 10.1.3.3 | Main | Most useful blogs I look always »

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

TrackBack

TrackBack URL for this entry:
http://blogs.oracle.com/mte1521/mt-tb.cgi/7781

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on September 28, 2008 12:04 AM.

The previous post in this blog was Calculated Columns cannot be Updateable - ADF 10.1.3.3.

The next post in this blog is Most useful blogs I look always.

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

Top Tags

Powered by
Movable Type and Oracle