mastering javaserver faces · facelets built as a replacement for jsp rendering, due to limitations...

43
Mastering JavaServer Faces Bryan Basham Software Alchemist [email protected] http://www.linkedin.com/in/SoftwareAlchemist Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Bryan Basham Bryan Basham — Mastering JavaServer Faces Slide 1

Upload: others

Post on 11-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Mastering JavaServer Faces

Bryan Basham

Software Alchemist

[email protected]

http://www.linkedin.com/in/SoftwareAlchemist

Colorado Software Summit: October 19 – 24, 2008 © Copyright 2008, Bryan Basham

Bryan Basham — Mastering JavaServer Faces Slide 1

Page 2: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 2

© Copyright 2008, Bryan Basham

Topics Mind Map

Introductionto JSF

RichFaces& AJAX4JSF

JSFFundamentals

MyFaces& Tomahawk

Other tools

Roll Your Own

MasteringJSF

Page 3: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 3

© Copyright 2008, Bryan Basham

Web UI Architecture Concerns

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

Client Server

UI Code

Page 4: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 4

© Copyright 2008, Bryan Basham

Client-side Technologies

Structure

XHTML (or HTML v4.01)

Presentation

Cascading Style Sheets (CSS)

Behavior

JavaScript (formally: ECMAScript 262 v3)

DOM API specification

JS objects (and JSON) for data models

Open source frameworks

Page 5: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 5

© Copyright 2008, Bryan Basham

Server-side Technologies

Structure

JSF for components (UI widgets)

JSP (or other) for layout of component tree

Behavior

JSF component event model

OO programming for data model

Open source implementations, frameworks, and component libraries

Page 6: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 6

© Copyright 2008, Bryan Basham

Separation of Concerns

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

Client

Server

UI Code

Data

Behavior

StructureStructure

Presentation

Behavior

Data

conversion

invoke

select next view

generate

enhanc

e

style / layout

Page 7: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 7

© Copyright 2008, Bryan Basham

Why JavaServer Faces?

Third generation Java-Web technology.

Closer to traditional UI development:

component-based

event-driven

Standards-based architecture

Open source community

Page 8: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 8

© Copyright 2008, Bryan Basham

The JSF Stack

Servlet / JavaServer Pages

JavaServer Faces

Component Frameworks

My Webapp

request/

response

tags

EL

componentsconversionvalidation

actions

Ajax and other control

new UI widgets

...and other facilities

Page 9: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 9

© Copyright 2008, Bryan Basham

JSF and Web Standards

JSF supports other Web standards

XHTML, for structure

CSS, for presentation

JavaScript, for client-side behavior

Use JSF libraries that facilitate client-side Web standards

The gotcha... JSF embeds JavaScript into the page

Page 10: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 10

© Copyright 2008, Bryan Basham

Topics Mind Map

Introductionto JSF

RichFaces& AJAX4JSF

JSFFundamentals

MyFaces& Tomahawk

Other tools

Roll Your Own

MasteringJSF

Page 11: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 11

© Copyright 2008, Bryan Basham

JSF Life Cycle

Web Container

JSF

Backing

Bean

<jsp>

...

....

</jsp>

ViewRoot

Form

InputText CmdLink...

request a view

creates

comp. tree

extracts

data

renders

view

POST

form data

binds

dataperform

action(s)

<jsp>

...

....

</jsp>

select next view

creates

comp. tree

rendersview

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

Page 12: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 12

© Copyright 2008, Bryan Basham

JSF Life Cycle

existing component tree

ViewRoot

Form

InputText CmdLink...

<jsp>

...

....

</jsp>

new component

tree

Faces

Servlet

Lifecycle

RESTORE

VIEW

APPLY REQ

VALUES

PROCESS

VALIDATIONS

UPDATE

MODEL

PROCESS

APPLICATION

RENDER

RESPONSE

restoreState

processDecodes

processValidations

processUpdates

processApplication

UIC

om

pTag

dispatch

doStart

doEnd

execute

render

saveState

encodeBegin

encodeEnd

encodeChildren

Page 13: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 13

© Copyright 2008, Bryan Basham

Data Conversion

All HTTP request data are strings.

Rich apps require rich data

simple non-string data: numbers, Boolean values, IP addresses, money, credit card #

complex data: structures, objects, entities with relationships

The JSF Converter interface:

The getAsObject method

The getAsString method

Page 14: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 14

© Copyright 2008, Bryan Basham

Data Conversion

JSF

Ipv4Address

Converter

The user modifies the value

and submits the form:

ipAddress=“172.20.30.47”

The HTML form is rendered

with the current value of the

ipAddress=“172.20.30.42”

172.20.30.42

172.20.30.47

current value

new value

getAsString()

getAsObject()

Page 15: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 15

© Copyright 2008, Bryan Basham

Field Validation

Allows field validation checks after data conversion

Option #1: call a method on a backing bean

<c:textField id="ipAddress" value="#{editIntf.interface.ipAddress}" required="true"

converterId="converter.Ipv4Address" validator="#{editIntf.validateIpAddress}" />

Option #2: invoke a validator object

<c:textField id="number" value="#{bean.myNumber}" required="true">

<f:validateLongRange minimum="10" maximum="100" />

</c:textField>

Page 16: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 16

© Copyright 2008, Bryan Basham

Field Validation

JSF

Ipv4Address

Converter

getAsObject()

172.20.30.47

new value

Backing

Beana validation error sends the form

back to the user with an error message.

validateIpAddress(...)

UIInput

validate(...)

gets stored in the UI

component for further

processing by the life cycle

Page 17: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 17

© Copyright 2008, Bryan Basham

Application Actions

Action components

UICommand (abstract), HtmlCommandLink, and HtmlCommandButton

Example:<h:commandButton value="Submit" actionListener="#{myBean.doThis}" />

Invokes the doThis method of your

backing bean when the user clicks the

button

Page 18: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 18

© Copyright 2008, Bryan Basham

Application Actions

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

Button

JSF

click

Backing

Bean

invoke:doThis()

HtmlCommandButton

broadcast(...)

Page 19: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 19

© Copyright 2008, Bryan Basham

Topics Mind Map

Introductionto JSF

RichFaces& AJAX4JSF

JSFFundamentals

MyFaces& Tomahawk

Other tools

Roll Your Own

MasteringJSF

Page 20: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 20

© Copyright 2008, Bryan Basham

MyFaces

is an implementation of the JSF spec.

is an open source tool from Apache

provides the standard set of UI widgets

also includes several additional component

libraries:

Tomahawk

Trinidad

Tobago

Orchestra

Page 21: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 21

© Copyright 2008, Bryan Basham

Standard Widget Set

Output: f:view, h:outputText, h:graphicImage,

Table: h:dataTable, h:column

Forms:

h:form, h:outputLabel, h:inputText/Secret/Textarea/...

h:selectBooleanCheckbox

h:selectOneListbox/Menu/Radio

h:selectManyListbox/Menu/Checkbox

Layout: h:panelGrid, h:panelGroup

Page 22: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 22

© Copyright 2008, Bryan Basham

SelectOneMenu: Screen Shot

Page 23: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 23

© Copyright 2008, Bryan Basham

SelectOneMenu: JSP<div id="exam_select">

<div>

<h:outputLabel for="exam_type_select">Exam category:</h:outputLabel>&#160;

<h:selectOneMenu value="#{examEditor.categoryOID}" id="exam_type_select">

<f:selectItems value="#{examEditor.categorySelectItems}" />

</h:selectOneMenu>

</div>

<div>

<h:outputLabel for="exam_name_select">Exam title:</h:outputLabel>&#160;

<h:selectOneMenu value="#{examEditor.examOID}" id="exam_name_select">

<f:selectItems value="#{examEditor.examSelectItems}" />

</h:selectOneMenu>

</div>

<div class="button">

<h:commandLink action="#{examEditor.viewExam}"><span>view

exam</span></h:commandLink>

</div>

<div class="button">

<h:commandLink action="#{examEditor.editExam}" immediate="false"><span>edit

exam</span></h:commandLink>

</div>

</div>

Page 24: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 24

© Copyright 2008, Bryan Basham

SelectOneMenu: Backing Bean

public Long getCategoryOID()

{

return categoryOID;

}

public void setCategoryOID(Long oid)

{

this.categoryOID = oid;

}

public List<SelectItem> getCategorySelectItems()

{

List<Category> categories = this.catSvc.getAllCategories(this.em);

List<SelectItem> result;

result = new ArrayList<SelectItem>(categories.size() + 1);

result.add(new SelectItem("0", "Select an exam category..."));

for ( Category cat : categories )

{

SelectItem item = new SelectItem(cat.getId(), cat.getTitle());

result.add(item);

}

return result;

}

Page 25: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 25

© Copyright 2008, Bryan Basham

Tomahawk Library

Compatible with MyFaces and Mojarra (RI)

Includes the forceId attribute

Provides a Tiles-like facility

Provides additional validators: email, credit

card, regexp matching

Additional UI widgets

Page 26: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 26

© Copyright 2008, Bryan Basham

Tomahawk Components

List: t:dataList

Table: t:dataTable, t:dataScroller, t:newspaperTable,

t:schedule

Input: t:inputDate, t:inputFileUpload, t:inputHtml, ...

Layout: t:panelLayout, t:panelTabbedPane,

t:panelStack, t:collapsiblePanel

Document: t:document/Body/Head, t:stylesheet

Page 27: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 27

© Copyright 2008, Bryan Basham

Trinidad Library

Partial page refresh (PPR)

Client-side converters and validators

Advanced client-side dialog boxes

Advanced navigation tools/components

File upload

Additional UI widgets

Page 28: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 28

© Copyright 2008, Bryan Basham

Trinidad Components

Table:

similar to UIData

supports paging, sorting, multiple item selection

Tree:

simple tree and tree-table

Charts:

many types: pie, bar, scatter plot, and so on

generates SVG graphics

Page 29: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 29

© Copyright 2008, Bryan Basham

Tobago Library

Styling by use of “themes”

Built-in I18N / L10N support

Controls:

table

tree

sheet

tab panel

Page 30: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 30

© Copyright 2008, Bryan Basham

Topics Mind Map

Introductionto JSF

RichFaces& AJAX4JSF

JSFFundamentals

MyFaces& Tomahawk

Other tools

Roll Your Own

MasteringJSF

Page 31: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 31

© Copyright 2008, Bryan Basham

RichFaces Library

Built-in support for Ajax

Skinnable styles

Rich component development kit

Resource packaging

Dynamic resources (e.g. building button

icons on the fly)

Page 32: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 32

© Copyright 2008, Bryan Basham

RichFaces Components

Layout: a4j:page, a4j:loadStyle, a4j:loadScript,

a4j:include

UI widgets: rich:calendar, rich:comboBox,

Tables: rich:dataTable, rich:datascroller,

rich:dataFilterSlider, sorting, filtering

Lists: ordered, unordered, definitions

Other: drag-n-drop support, effects, panels, trees, and

a whole lot more

Page 33: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 33

© Copyright 2008, Bryan Basham

Ajax Support

Forms: form submittal via Ajax; rerender portion of

screen

Triggers:

Periodic: a4j:poll, a4j:repeat

Events: a4j:support

JSF: rich:ajaxValidator

Most components have built-in Ajax support

Page 34: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 34

© Copyright 2008, Bryan Basham

OnChange: JSP<div id="exam_select">

<div>

<h:outputLabel for="exam_type_select">Exam category:</h:outputLabel>&#160;

<h:selectOneMenu value="#{examEditor.categoryOID}" id="exam_type_select">

<f:selectItems value="#{examEditor.categorySelectItems}" />

<a4j:support event="onchange" actionListener="#{examEditor.findExams}"

reRender="exam_name_select" />

</h:selectOneMenu>

</div>

<div>

<h:outputLabel for="exam_name_select">Exam title:</h:outputLabel>&#160;

<h:selectOneMenu value="#{examEditor.examOID}" id="exam_name_select">

<f:selectItems value="#{examEditor.examSelectItems}" />

</h:selectOneMenu>

</div>

...

</div>

Page 35: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 35

© Copyright 2008, Bryan Basham

OnChange: Backing Bean public void findExams() {

this.category = catSvc.getCategoryById(this.categoryOID, this.em);

if ( this.category != null ) {

this.exams = this.category.getExams();

}

}

public List<SelectItem> getExamSelectItems() {

List<SelectItem> result;

if ( this.exams == null || this.exams.size() == 0 ) {

result = new ArrayList<SelectItem>(1);

result.add(new SelectItem("0", "First select a category above."));

} else {

result = new ArrayList<SelectItem>(this.exams.size() + 1);

result.add(new SelectItem("0", "Select an exam..."));

for ( CertificatonExam e : this.exams ) {

SelectItem item = new SelectItem(e.getId(), e.getTitle());

result.add(item);

}

}

return result;

}

Page 36: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 36

© Copyright 2008, Bryan Basham

Topics Mind Map

Introductionto JSF

RichFaces& AJAX4JSF

JSFFundamentals

MyFaces& Tomahawk

Other tools

Roll Your Own

MasteringJSF

Page 37: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 37

© Copyright 2008, Bryan Basham

Other component libraries

JSF has broad support and rich community

See JSFCentral.org

See JSF Forum on java.net

There are many open source and COTS libraries

Page 38: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 38

© Copyright 2008, Bryan Basham

Facelets

Built as a replacement for JSP rendering, due to limitations in JSF v1.1

eliminates the need for f:verbatim blocks

not really needed in JSF v1.2

Support for tiling, ie. “view composition”

Support for template-based component creation

Page 39: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 39

© Copyright 2008, Bryan Basham

Seam

Integration between UI and Business tiers: JSF <=> EJB3

Use of annotations simplifies complex deployment descriptors

Works well with Ajax and Ajax-enabled JSF libraries such as RichFaces

Conversational scope

Page 40: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 40

© Copyright 2008, Bryan Basham

Topics Mind Map

Introductionto JSF

RichFaces& AJAX4JSF

JSFFundamentals

MyFaces& Tomahawk

Other tools

Roll Your Own

MasteringJSF

Page 41: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 41

© Copyright 2008, Bryan Basham

Building Components

Several open source libraries provide rich APIs for building components

MyFaces

RichFaces

Consider the need to inject component-

specific resources

styles

JavaScript

media

Page 42: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 42

© Copyright 2008, Bryan Basham

Q & A

Introductionto JSF

RichFaces& AJAX4JSF

JSFFundamentals

MyFaces& Tomahawk

Other tools

Roll Your Own

MasteringJSF

Page 43: Mastering JavaServer Faces · Facelets Built as a replacement for JSP rendering, due to limitations in JSF v1.1 eliminates the need for f:verbatim blocks not really needed in JSF

Colorado Software Summit: October 19 – 24, 2008

Bryan Basham – Mastering JavaServer Faces Slide 43

© Copyright 2008, Bryan Basham

ResourcesJavaServer Faces in Action (Manning)

JavaServer Faces:

java.sun.com

java.net

JSF Spec (JSR #252)

JSFCentral.org

JSF tutorials

Component Libraries:

MyFaces (for JSF v1.2)

RichFaces

Other tools:

Facelets

Seam Framework