This blog explains about how to create 'View Criteria' dynamically
EmployeeVOImpl empVO =
getEmployeeVO();
ViewCriteria vc =empVO.createViewCriteria();
ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
if(employeeID != null){
ViewCriteriaItem vci=vcRow.ensureCriteriaItem("EmployeeId");
vci.setValue(new Number(employeeID));
vc.addElement(vcRow);
empVO.appendViewCriteria(vc);
}
empVO.executeQuery();
Row[] filterRows =
empVO.getFilteredRows("EmployeeId", new Number(employeeID));
No comments:
Post a Comment