Posts

Showing posts from July, 2011

Date Effective property of VO.

Image
Some time we have come to scenarios when the validatity of the row is dependent over a column value of date type. A typical example of this is contractual employees, if the contract date is over we may not be interested these employees for the payrole. ADF provides a property effective date for this use case. Its quite easy to implement and in the VO by just setting a flag we can ignore these rows. For this example we are using default HR schema of the XE database, we will create a new table as the existing table does not solve our purpose. create table CONTRATUAL_EMP as select * from employees; alter table CONTRATUAL_EMP add (CONTRACT_END_DATE DATE); update CONTRATUAL_EMP set CONTRACT_END_DATE = sysdate -10 where mod(employee_id,2) =0; update CONTRATUAL_EMP set CONTRACT_END_DATE = sysdate + 200 where mod(employee_id,2) =1; commit; Now table is ready, We are moving to to project. please download the project from the link . Open this project and then run the page DisplayResult.jpx. No