09_Enhancing the Web Tier With ADF Faces Components
-
Upload
suresh1130 -
Category
Documents
-
view
229 -
download
0
Transcript of 09_Enhancing the Web Tier With ADF Faces Components
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
1/28
9Copyright 2007, Oracle. All rights reserved.
Enhancing the Web Tier with
ADF Faces Components
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
2/28
9-2 Copyright 2007, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to do
the following:
Describe the benefits of Application Development
Framework (ADF) Faces Use the components of ADF Faces
Explain how rich-client style components can be
used for different types of clients
Set configurable elements in theadf-faces-config.xml file to override ADF Faces-specific
functionality
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
3/28
9-3 Copyright 2007, Oracle. All rights reserved.
ADF Faces: Overview
Evolution of ADF UIX
Built on top of JSF APIs
Deployable on any compliant implementation of
JSF Complements what is missing in JSF 1.1:
It has a rich set of components.
It provides client-side behavior.
It supports customization.
It provides direct support for working with
databases.
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
4/28
9-4 Copyright 2007, Oracle. All rights reserved.
What ADF Faces Brings to JSF
Much larger component set, that is, more than 100
types of components
Far more advanced and interesting components
Partial-page rendering Rich feature set for customizing applications
Using the same EL as ADF Model
Accessibility and internationalization support
across the board Framework features, such as dialog framework,
and support for processes
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
5/28
9-5 Copyright 2007, Oracle. All rights reserved.
Key Terms
UI Component JSF is component based
Managed Bean Objects maintained by the JSF inversion of control
mechanism Expression Language (EL)
Makes it possible to access application data stored
in JavaBeans components easily
Navigation Rule
The rules that govern page flow Life cycle
Cycle of creation, validation, databinding, and
business service interactions of a page
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
6/28
9-6 Copyright 2007, Oracle. All rights reserved.
Components
A page definition is (potentially) abstract.
Constructed from components and containers (also
components)
Conceptually similar to the Swing/Abstract Window
Toolkit (AWT) model
Components have:
Attributes
Behaviors
One or more renderers (Components themselvesare implementation independent.)
Components may be nested.
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
7/289-7 Copyright 2007, Oracle. All rights reserved.
Rendering and Behavior
Radio group
label
label
label
Renderer
Radio group
List
Menu
Behavior
Select one
JSF components
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
8/289-8 Copyright 2007, Oracle. All rights reserved.
ADF Faces Components: Examples
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
9/289-9 Copyright 2007, Oracle. All rights reserved.
ADF Faces Components
ADF Faces includes the following component types:
Data components
Input components
Layout components Navigational components
Output components
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
10/289-10 Copyright 2007, Oracle. All rights reserved.
af:tableSelectMany
Data Components
af:column
af:table
af:selectRangeChoiceBar
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
11/289-11 Copyright 2007, Oracle. All rights reserved.
Input Components
af:selectOrderShuttle
af:selectInputDateaf:selectBooleanRadio
af:selectBooleanCheckbox
af:inputText
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
12/289-12 Copyright 2007, Oracle. All rights reserved.
Layout Components
PagepanelPage
panelForm
panelLabelAndMessage
panelHorizontal
panelButtonBar
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
13/289-13 Copyright 2007, Oracle. All rights reserved.
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
14/289-14 Copyright 2007, Oracle. All rights reserved.
Navigational Components
commandButton
goLink
menuChoice
menuList
processTrain
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
15/289-15 Copyright 2007, Oracle. All rights reserved.
Output Components
objectSeparator
outputFormatted
outputText
messages
progressIndicator
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
16/289-16 Copyright 2007, Oracle. All rights reserved.
Facets
Facets are: Named relationships
between
components
Similar to detail
elements
Used to specify
subordinate
elements such as
header or footers Displayed with
the component itself
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
17/289-17 Copyright 2007, Oracle. All rights reserved.
Facets
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
18/289-18 Copyright 2007, Oracle. All rights reserved.
Custom Configuration Files and Libraries
adf-faces-config.xml
adf-faces-skins.xml
adf-faces-impl.jar and adf-faces-api.jar
adfshare.jaraf.tld and afh.tld
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
19/289-19 Copyright 2007, Oracle. All rights reserved.
ADF Faces Client-Side Validation
A major missing feature of JSF
Supported by Struts Validator
Supported by ADF Faces:
Server- and client-side validation and conversionfrom the same code
Use standard JSF converters and validators
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
20/289-20 Copyright 2007, Oracle. All rights reserved.
Look and Feel Customization
ADF Faces provides customizable look and feel,
through the use of skins.
A skin is a global style sheet that can be set at the
application level.
ADF Faces applications use the Oracle skin (by
default).
You can create custom skins.
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
21/289-21 Copyright 2007, Oracle. All rights reserved.
ADF Faces Skins
Default: Oracle, Minimal, and Simple
CSS file: Using CSS 3.0 syntax
Defined in adf-faces-skins.xml
myskin.desktopmyskinoracle.adf.desktop
skins/myskin/mySkin.css
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
22/289-22 Copyright 2007, Oracle. All rights reserved.
Debugging
Aelement inadf-faces-config.xml:
Aelement in web.xml:
true
oracle.adfinternal.view.faces.DISABLE_CONTENT_COMPRESSION
true
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
23/289-23 Copyright 2007, Oracle. All rights reserved.
ADF Faces: Consistent Programming
Model
Business Logic
Skins
Render Kits
Components
Interface
J2EE
Industrial
XML
ITS
Phone/PDABrowser
AS
HTML RIAMobileTelnetHTML ASK
XML
JavaServer Faces / JSP
FacesRI ADFFacesPortal
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
24/289-24 Copyright 2007, Oracle. All rights reserved.
Multiclient Development
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
25/28
9-25 Copyright 2007, Oracle. All rights reserved.
Conditional Rendering
JSF components have a Renderedproperty thatcan be set with EL.
Reference a method in a managed bean with EL to
conditionally render a component.
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
26/28
9-26 Copyright 2007, Oracle. All rights reserved.
Partial Page Rendering
Allows small areas of a page to be refreshed
without redrawing the entire page
Only supported on certain browsers:
Internet Explorer 5.5 and above Mozilla 1.0/Netscape 7.0
Offers superior run-time interactivity
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
27/28
9-27 Copyright 2007, Oracle. All rights reserved.
Summary
In this lesson, you should have learned how to:
Describe the benefits of ADF Faces
Use the components of ADF Faces
Configure ADF Faces
-
8/14/2019 09_Enhancing the Web Tier With ADF Faces Components
28/28
Practice Overview:
Using ADF Faces Components
This practice covers the following topics:
Creating a template that uses ADF Faces layout
components
Applying the template to new JSF pages Defining JSF navigation