P. 1
09_Enhancing the Web Tier With ADF Faces Components

09_Enhancing the Web Tier With ADF Faces Components

|Views: 527|Likes:
Published by suresh1130

More info:

Published by: suresh1130 on Sep 15, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

Enhancing the Web Tier with ADF Faces Components

9

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 the adf-facesconfig.xml file to override ADF Faces-specific functionality

9-2

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.

9-3

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

9-4

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

9-5

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 themselves are implementation independent.)

Components may be nested.

9-6

Copyright © 2007, Oracle. All rights reserved.

Rendering and Behavior
Radio group label label label
<af:selectOneChoice> <item 1 – label> <Item 2 – label> <Item 3 – label> </>

JSF components Renderer Radio group List Menu
9-7

Behavior Select one

Copyright © 2007, Oracle. All rights reserved.

ADF Faces Components: Examples

9-8

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

9-9

Copyright © 2007, Oracle. All rights reserved.

Data Components

af:selectRangeChoiceBar af:column

af:table af:tableSelectMany
9-10 Copyright © 2007, Oracle. All rights reserved.

Input Components
af:inputText af:selectBooleanCheckbox

af:selectBooleanRadio

af:selectInputDate

af:selectOrderShuttle
9-11 Copyright © 2007, Oracle. All rights reserved.

Layout Components
Page panelPage

panelForm

panelLabelAndMessage panelHorizontal panelButtonBar
9-12 Copyright © 2007, Oracle. All rights reserved.

9-13

Copyright © 2007, Oracle. All rights reserved.

Navigational Components

commandButton goLink menuChoice menuList processTrain

9-14

Copyright © 2007, Oracle. All rights reserved.

Output Components

objectSeparator outputFormatted outputText messages

progressIndicator

9-15

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

9-16

Copyright © 2007, Oracle. All rights reserved.

Facets

9-17

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.jar af.tld and afh.tld

9-18

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 conversion from the same code – Use standard JSF converters and validators

9-19

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.

9-20

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

<skins xmlns="http://xmlns.oracle.com/adf/view/faces/skin"> <skin> <id>myskin.desktop</id> <family>myskin</family> <render-kit-id>oracle.adf.desktop</render-kit-id> <style-sheet-name>skins/myskin/mySkin.css</stylesheet-name> </skin> </skins>

9-21

Copyright © 2007, Oracle. All rights reserved.

Debugging
• A <debug-output> element in adf-faces-config.xml:
<debug-output>true</debug-output>

A <context-param> element in web.xml:
<context-param> <param-name> oracle.adfinternal.view.faces.DISABLE_CONTENT_COMPRESSION </param-name> <param-value>true</param-value> </context-param>

9-22

Copyright © 2007, Oracle. All rights reserved.

ADF Faces: Consistent Programming Model Industrial
Browser
Phone/PDA

ITS

AS

XML HTML Portal Faces RI

XML RIA ASK

Skins Render Kits Components Interface Business Logic

HTML Telnet Mobile

ADF Faces

JavaServer Faces / JSP J2EE

9-23

Copyright © 2007, Oracle. All rights reserved.

Multiclient Development

9-24

Copyright © 2007, Oracle. All rights reserved.

Conditional Rendering
• • JSF components have a Rendered property that can be set with EL. Reference a method in a managed bean with EL to conditionally render a component.

9-25

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

9-26

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

9-27

Copyright © 2007, Oracle. All rights reserved.

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

9-28

Copyright © 2007, Oracle. All rights reserved.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->