Wednesday, May 14, 2014

How to create the View Criteria Programmatically in ADF?

public void searchEmployee(Number employeeId, String email) {
    EmployeesVOImpl vo = getEmployeesVO1();
    ViewCriteria vc = vo.createViewCriteria();
    ViewCriteriaRow vcRow = vc.createViewCriteriaRow();

    vcRow.setAttribute("EmployeeId", employeeId);
    vc.addRow(vcRow);

    vcRow.setAttribute("Email", email);
    vc.addRow(vcRow);

    vo.applyViewCriteria(vc);
    vo.executeQuery();
}

No comments:

Post a Comment