SlideShare a Scribd company logo
JavaServer Faces 2.0 Overview Roger Kitain JSF Co-Specification Lead mailto:Roger.Kitain@Sun.Com http://www.java.net/blogs/rogerk/ https://twitter.com/rogerk09
Hi Level Categories of Features Foundational New  Features Large New  Features
System Events Publish/Subscribe event model
JSF Lifecycle events
Listeners registered at 3 scopes: Component: UIComponent.subscribeToEvent()
View: UIViewRoot.subscribeToEvent()
Application: Application.subscribeToEvent() Publish using: Application.publishEvent() Declarative component event listener registration: <h:inputText> <f:event type=”preValidate” listener=”#{bean.preVal}”/> </h:inputtext>
Resources No need for separate Filter or Servlet
Loaded from Classpath or filesystem
Library / i18n / Versioning Support
Java API: @ResourceDependency ; @ResourceDependencies Attributes: library name; resource name
“ Target” Attribute: head, body, form Markup: <h:head> <h:body> <h:outputScript> <h:outputStylesheet>
Resources
View Traversal Multiple components in the view visited for a single traversal
Useful for component(s) processing
VisitContext Specifies components to visit
createVisitContext() UIComponent.visitTree() Performs component(s) visit Usages: Ajax ; State Saving
Partial State Saving JSF 1.x State Saving: Tedious/error prone for component developers
Performance issues(session bloat) JSF 2.0: Partial State Saving Only save what's changed since initial view creation
Per view state size up to 4 x smaller
Default for JSF 2.0 components (written with Facelets)
PartialStateHolder signals when initial state is configured : markInitialState() StateHelper Storage map for component state (attributes,listeners,...)
No need for saveState/restoreState
GET Request Support View Parameters Map incoming GET request parameter values to any EL bean/property
Mappings specified with <f:viewParam> component: <f:metadata> <f:viewParam  name=”user” value=”#{bean.userName}” /> </f:metadata> GET Request: page1.xhtml?user=johndoe
<f:viewParam> is EditableValueHolder converters/validators can be used on view parameters
GET Request Support <h:link>  <h:button> Issue GET requests without hand coding destination URL
Uses JSF navigation system for determining destination <h:link outcome=”success”/> Destination determined at render time Outcome mapped to target view identifier Integrate with view parameters: <h:link outcome=”success” includeViewParams=”true”/> Can use <f:param> to specify parameters too
JSF 2.0 Component Model Why Do We Need It? With the 1.x component model – too many artifacts, hooks: Component class
Renderer
Tag class
Tld
faces-config.xml
......
JSF 2.0 Component Model Powerful tools:  Templating Facelets is the foundation Optimized for JSF
Ad

More Related Content

What's hot (20)

Java Server Faces (JSF) - advanced
Java Server Faces (JSF) - advancedJava Server Faces (JSF) - advanced
Java Server Faces (JSF) - advanced
BG Java EE Course
 
JSF Custom Components
JSF Custom ComponentsJSF Custom Components
JSF Custom Components
Michael Fons
 
Jsf
JsfJsf
Jsf
Shaharyar khan
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
Joonas Lehtinen
 
Rails Plugins - Linux For You, March 2011 Issue
Rails Plugins - Linux For You, March 2011 IssueRails Plugins - Linux For You, March 2011 Issue
Rails Plugins - Linux For You, March 2011 Issue
Sagar Arlekar
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
Pamela Fox
 
An Introduction to Django Web Framework
An Introduction to Django Web FrameworkAn Introduction to Django Web Framework
An Introduction to Django Web Framework
David Gibbons
 
Struts Overview
Struts OverviewStruts Overview
Struts Overview
elliando dias
 
Ajax Rails
Ajax RailsAjax Rails
Ajax Rails
hot
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
Harsha Nagaraj
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
David Gibbons
 
Vaadin Components
Vaadin ComponentsVaadin Components
Vaadin Components
Joonas Lehtinen
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
Yashobanta Bai
 
Securing JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top TenSecuring JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top Ten
David Chandler
 
Angular js
Angular jsAngular js
Angular js
prasaddammalapati
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
SoftServe
 
Spring MVC 3.0 Framework (sesson_2)
Spring MVC 3.0 Framework (sesson_2)Spring MVC 3.0 Framework (sesson_2)
Spring MVC 3.0 Framework (sesson_2)
Ravi Kant Soni ([email protected])
 
Django 1.10.3 Getting started
Django 1.10.3 Getting startedDjango 1.10.3 Getting started
Django 1.10.3 Getting started
MoniaJ
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
Max Katz
 
UI5con 2018: News from Control Development
UI5con 2018: News from Control DevelopmentUI5con 2018: News from Control Development
UI5con 2018: News from Control Development
Andreas Kunz
 
Java Server Faces (JSF) - advanced
Java Server Faces (JSF) - advancedJava Server Faces (JSF) - advanced
Java Server Faces (JSF) - advanced
BG Java EE Course
 
JSF Custom Components
JSF Custom ComponentsJSF Custom Components
JSF Custom Components
Michael Fons
 
Vaadin Components @ Angular U
Vaadin Components @ Angular UVaadin Components @ Angular U
Vaadin Components @ Angular U
Joonas Lehtinen
 
Rails Plugins - Linux For You, March 2011 Issue
Rails Plugins - Linux For You, March 2011 IssueRails Plugins - Linux For You, March 2011 Issue
Rails Plugins - Linux For You, March 2011 Issue
Sagar Arlekar
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
Pamela Fox
 
An Introduction to Django Web Framework
An Introduction to Django Web FrameworkAn Introduction to Django Web Framework
An Introduction to Django Web Framework
David Gibbons
 
Ajax Rails
Ajax RailsAjax Rails
Ajax Rails
hot
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
David Gibbons
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
Yashobanta Bai
 
Securing JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top TenSecuring JSF Applications Against the OWASP Top Ten
Securing JSF Applications Against the OWASP Top Ten
David Chandler
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
SoftServe
 
Django 1.10.3 Getting started
Django 1.10.3 Getting startedDjango 1.10.3 Getting started
Django 1.10.3 Getting started
MoniaJ
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
Max Katz
 
UI5con 2018: News from Control Development
UI5con 2018: News from Control DevelopmentUI5con 2018: News from Control Development
UI5con 2018: News from Control Development
Andreas Kunz
 

Viewers also liked (7)

Lpo Dag Van De Wabo 2009 Vl
Lpo   Dag Van De Wabo 2009   VlLpo   Dag Van De Wabo 2009   Vl
Lpo Dag Van De Wabo 2009 Vl
guest485448
 
Whs STaR Chart
Whs STaR ChartWhs STaR Chart
Whs STaR Chart
cburnett
 
Arab Internet Governance Forum MultiStakeholder Model
Arab Internet Governance Forum MultiStakeholder ModelArab Internet Governance Forum MultiStakeholder Model
Arab Internet Governance Forum MultiStakeholder Model
OneWebDay, Inc.
 
Con5133
Con5133Con5133
Con5133
Roger Kitain
 
10 MontañAs Europeas
10 MontañAs Europeas10 MontañAs Europeas
10 MontañAs Europeas
Diegoparalaia
 
Ngày đẹp nhất đời tôi
Ngày đẹp nhất đời tôiNgày đẹp nhất đời tôi
Ngày đẹp nhất đời tôi
PeterBroon
 
Prezentarea lui Serban de la Marketing 360
Prezentarea lui Serban de la Marketing 360Prezentarea lui Serban de la Marketing 360
Prezentarea lui Serban de la Marketing 360
Headvertising
 
Lpo Dag Van De Wabo 2009 Vl
Lpo   Dag Van De Wabo 2009   VlLpo   Dag Van De Wabo 2009   Vl
Lpo Dag Van De Wabo 2009 Vl
guest485448
 
Whs STaR Chart
Whs STaR ChartWhs STaR Chart
Whs STaR Chart
cburnett
 
Arab Internet Governance Forum MultiStakeholder Model
Arab Internet Governance Forum MultiStakeholder ModelArab Internet Governance Forum MultiStakeholder Model
Arab Internet Governance Forum MultiStakeholder Model
OneWebDay, Inc.
 
10 MontañAs Europeas
10 MontañAs Europeas10 MontañAs Europeas
10 MontañAs Europeas
Diegoparalaia
 
Ngày đẹp nhất đời tôi
Ngày đẹp nhất đời tôiNgày đẹp nhất đời tôi
Ngày đẹp nhất đời tôi
PeterBroon
 
Prezentarea lui Serban de la Marketing 360
Prezentarea lui Serban de la Marketing 360Prezentarea lui Serban de la Marketing 360
Prezentarea lui Serban de la Marketing 360
Headvertising
 
Ad

Similar to JSF 2.0 (JavaEE Webinar) (20)

Rich faces
Rich facesRich faces
Rich faces
BG Java EE Course
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
oscon2007
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
IMC Institute
 
Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2
Max Katz
 
Facelets
FaceletsFacelets
Facelets
cagataycivici
 
Facelets
FaceletsFacelets
Facelets
lingli1031
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife Spring
Mario Fusco
 
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
Skills Matter
 
Jsf Ajax
Jsf AjaxJsf Ajax
Jsf Ajax
rajivmordani
 
Custom Action Framework
Custom Action FrameworkCustom Action Framework
Custom Action Framework
Alfresco Software
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
cagataycivici
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
wiradikusuma
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
jbarciauskas
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Arun Gupta
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
Yiguang Hu
 
Struts2
Struts2Struts2
Struts2
yuvalb
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
yuvalb
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
Matt Raible
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
Software Park Thailand
 
java ee 6 Petcatalog
java ee 6 Petcatalogjava ee 6 Petcatalog
java ee 6 Petcatalog
Carol McDonald
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
IMC Institute
 
Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2Ajax Applications with RichFaces and JSF 2
Ajax Applications with RichFaces and JSF 2
Max Katz
 
Swiss army knife Spring
Swiss army knife SpringSwiss army knife Spring
Swiss army knife Spring
Mario Fusco
 
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
Skills Matter
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
wiradikusuma
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
jbarciauskas
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Arun Gupta
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
Yiguang Hu
 
Struts2
Struts2Struts2
Struts2
yuvalb
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
yuvalb
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
Matt Raible
 
Ad

JSF 2.0 (JavaEE Webinar)

Editor's Notes

  • #33: Open Source from Sun allows a combined vision of the stack - Open Source provides the quality gained from thousands of developers reviewing and testing the quality of the product, the innovations which are determined by the community who builds what they need not what a vendor desires or has been driven by a few major customers, allows customers full transparency into the source code to determine extensions and how to leverage code to full use, and last , open source allows customers to pay at the point of their value of the product – at production time not at the intial stages of development. Closed source solutions are a drain on the enterprise by costing up front extensive license fees plus uncontrolled annual maintenance fees, tools which improve productivity are often complex and they plus extensions built by the vendor lead to planned lock in.
  • #34: Small subset of EJB 3.1 API required by Java EE Platform 6 Web Profile Broadens the availability of EJB technology Without losing portability Any 3.1 Lite application can be deployed to Web Profile and Full Java EE 6 Platform Made possible by simplified .war packaging
  • #35: Open Source from Sun allows a combined vision of the stack - Open Source provides the quality gained from thousands of developers reviewing and testing the quality of the product, the innovations which are determined by the community who builds what they need not what a vendor desires or has been driven by a few major customers, allows customers full transparency into the source code to determine extensions and how to leverage code to full use, and last , open source allows customers to pay at the point of their value of the product – at production time not at the intial stages of development. Closed source solutions are a drain on the enterprise by costing up front extensive license fees plus uncontrolled annual maintenance fees, tools which improve productivity are often complex and they plus extensions built by the vendor lead to planned lock in.