Create named criteria in EJB Data control

This article gives the detailed steps on creating named criteria in EJB Data control.Note that this feature is available in Jdev version 11.1.2.0.0

Use Case Description

Suppose we have defined an EJB Entity Object & we would like to filter the Entity object based on some criteria,then this filtering can be achieved by creating named criteria in EJB Data Control.

Implementation steps

Let us suppose that we have created Java EE Web Application with Entities from Emp table

EJB_Entities.JPG



Create session bean,generate data control for the same

sessionbean.jpeg







Edit empFindAll in DataControls.dcx file

datacontrols.JPG


Create simple Named Criteria: deptno>=20

ejb_namedcr1.JPG









Create on '+' icon to create Named Criteria:

ejb_namedcr2.JPG
Refresh the Data Controls & create a new jspx page.Drop EmpCriteria as ADF Query Panel with Table

adfquery.JPG




Run the page,click on search button & we will see that Emp table shows filtered records



Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tips and Tricks from Oracle's JDeveloper & ADF QA

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