public void getEmployeesInDept(Integer deptId) { if (deptId == null || deptId == 0) { ViewObjectImpl empDeptVO = this.getEmpDeptVO(); //View Criteria without bind variable ViewCriteria vc = empDeptVO.getViewCriteria("noRowsVC"); empDeptVO.applyViewCriteria(vc); empDeptVO.executeQuery(); } else { ViewObjectImpl empDeptVO = this.getEmpDeptVO(); //View Criteria with bind variable 'Bind_deptId' empDeptVO.setApplyViewCriteriaName("findByDeptId"); empDeptVO.setNamedWhereClauseParam("Bind_deptId", deptId); empDeptVO.executeQuery(); } }
The above method shows how to execute view criterias "noRowsVC"(with no bind variables) and "findByDeptId"(which has a bind variable "Bind_deptId") in EmpDeptVO. The below screenshots show the view criterias in EmpDeptVO.
That's it. The method executes the VC and gets the query results. You can expose this method in client's interface and add this method in jsff pagedef file as a methodAction binding. The later post shows how to pass parameters and call/execute this AMImpl method ( i.e., getEmployeesInDept) in UI project's java bean.
Hi i tried the same but ViewObjectImpl empDeptVO = this.getEmpDeptVO(); returns null for me
ReplyDeleteThanks man.. It helped.. cheers..
ReplyDeleteThanks for the informative share.
ReplyDeleteWeb Design and Development company in Chennai
20170303shizhong
ReplyDeletemichael kors outlet
jordan pas cher
ghd straighteners
jimmy choo
oakley sunglasses
nike air max outlet
coach outlet
michael kors handbags
kd 9 shoes
polo ralph lauren
michael kors outlet
ReplyDeletekate spade handbags
off white x nike
lebron 13
vapormax
yeezy shoes
balenciaga triple s
supreme clothing
polo ralph lauren
air jordan
hermes
ReplyDeletegolden goose sneakers
golden goose
air jordan
yeezy boost 350 v2
kyrie shoes
kobe byrant shoes
a bathing ape
golden goose shoes
lebron 17 shoes
company website see here click this over here now aaa replica bags more info here you could try this out
ReplyDelete