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
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

bocadmin_ww

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today