Databases Reference
In-Depth Information
Let us now add an EL expression to the page that we have created. Here we are going to use
the
af:switcher
component to display two secions in the
employee.jspx
page. One is
to display content that displays the employee informaion. The other facet will display the
department informaion.
Time for action - adding an EL expression
1.
Add the
af:switcher
component to the page from the
Component
palete.
2.
Select the
switcher
component in the page from the
Structure
window or from
the
design
view.
3.
From the
Structure
window right-click on the
af:switcher
component and then
select
Insert
into the opion to insert a facet.
4.
Provide the
facet
name as
first
. Repeat the same step to add another facet
named
second
.
5.
In the property inspector, provide the value as
first
for the
defaultFacet
property.
6.
Inside the irst facet, add the employee informaion from the
Data Controls
palete.
Drag-and-drop the
EmpVO
informaion on to the irst facet.
7.
Add the
DeptVO
to the second facet. Surround the table with a group layout or a
stretch layout based on the requirements of the page.
8.
Now add the following EL expression to the
facetName
property of the switcher:
#{bindings. EmpVO1.estimatedRowCount > 0 ? 'first' : 'second'}
Search WWH ::
Custom Search