SlideShare a Scribd company logo
Introduction toJSF
ObjectiveUnderstand the basic concepts of Java Server Faces (JSF) Technology.
AgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
JSF (JavaServer Faces) Framework Is…A server side user interface component framework for Java technology-based web applicationsF-35 JSF Joint Strike Fighter
Ok, but what JSF really is?A specification and reference implementation for a web application development frameworkComponentsEventsValidators & convertersNavigationBack-end-data integrationLocalizationError Handling
But why JSF?StandardHuge vendor and industry supportMVC for web applicationsClean separation of rolesEasy to useExtendable Component and Rendering architectureSupport for client device independence
AgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
JSF ArchitectureServerDesktopBrowserHTMLRenderer kitHTMLAppBackendFrontCtrlJSF PageJSF PagePhoneWMLRenderer kitWML
Request Processing Lifecycle PhasesRestore component tree phaseApply request values phaseProcess validations phaseUpdate model values phaseInvoke application phaseRender response phase
Request Processing Lifecycle PhasesSubmitted form values stored in component
Component values are convertedComponent tree retrievedRestoreViewRequestComponent valuesvalidatedComponent valuesbound to backing beanApplyRequestValuesProcessValidationsEvents handled
Methods invoked
Navigation calculatedUpdateModel ValuesInvokeApplicationRenderResponseResponseComponent values are updated from backing bean propertiesSystem-level phaseApplication-level phase
AgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
User Interface Component ModelUI componentsEvent handling modelConversion and Validation modelRendering modelPage navigation support
UI ComponentsUIComponent/UIComponentBaseBase class for all user interface componentsStandard UIComponent SubclassesUICommand, UIForm, UIOutputUIGraphic, UIInput, UIPanel, UIParameterUISelectBoolean, UISelectMany, UISelectOneExample<h:inputTextid="Key"value="#{message.key}" required="true"rendered="#{resBean.editModeRow}"/>ValidatorsValidators – pluggable validation on UIInput valuesJSF provides implementation for common classes (String reg. exp. validator, decimal range validator etc.)Can apply one or more per componentEasy to create custom validatorsImplement interface and
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException;Example<h:inputTextvalue="#{message.key}" required="true"rendered="#{resBean.editModeRow}“>     <f:validateLengthmaximum="15"minimum="6"/></h:inputText>ConvertersConverters – pluggable conversion mechanismJSF provides implementation for common classes (Integer, Date etc.)
Easy to create custom convertersImplement interface and Output: Object to String
Input: String to ObjectExample<h:inputTextid="Key"value="#{testBean.today}" converter=“CustomDateConverter"/>Rendering ModelRenderers-Adapt components to a specific markup languageDecoding
EncodingRenderKits—Library of RenderersMap component classes to component tags
Is a custom tag library
Basic HTML RenderKitEvents and ListenersStandard events and listenersActionEvent—UICommand component activated by the user
ValueChangedEvent—UIInput component whose value was just changedSystem eventsPossibility to work with PhaseEvents and PhaseListeners
Global and component system events - UIComponent.subscribeToEvent() or <f:event> tag.Navigation ModelApplication developer responsibilityDefined in Application configuration file (faces-config.xml)
Or implicitly (since JSF 2.0)Navigation rulesDetermine which page to go
Navigation caseNavigation Model Sample<navigation-rule>		<from-view-id>/wizard/item.jsp</from-view-id>		<navigation-case>			<from-outcome>wizardIndex</from-outcome>			<to-view-id>/wizerd/start.jsp</to-view-id></navigation-case>		<navigation-case>			<from-outcome>goBack</from-outcome>			<to-view-id>/wizard/cat3.jsp</to-view-id>		</navigation-case>		</navigation-rule>
AgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
What’s new?FaceletsView Declaration LanguageAnnotation based configurationStandardized AjaxImplicit NavigationScopes (conversation, view, flash, custom)Composite ComponentsBean Validation SupportError Handlingmore - resource loading, improved GET support, behaviors, tree visiting, system events and many more (out of scope)
Facelets, Annotations, ScopesFacelets are used by default instead of JSP.Annotation based configuration@ManagedBean, @...Scoped, @FacesConverter, @FacesValidator etc.New scopesView – state is preserved for the view (URL).
Conversation and Flash.
CustomStandardized AjaxTwo ways to useJavaScript API - jsf.ajax.request()
f:ajax tagExamples<h:selectOneMenuvalue="#{dynamicProperties.targetClass}"><f:ajaxevent="change"execute="@form"render="@form"/><f:selectItemsvalue="#{dynamicProperties.targetClasses}"/></h:selectOneMenu><h:commandButtonvalue="Count"onclick="jsf.ajax.request(this.id, event, {execute: this.id, render: 'out1'}); return false;"/>
Ad

More Related Content

What's hot (20)

Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
Ashish Gupta
 
Jsf2.0 -4
Jsf2.0 -4Jsf2.0 -4
Jsf2.0 -4
Vinay Kumar
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component Behaviors
Andy Schwartz
 
Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
guest764934
 
Jsf Framework
Jsf FrameworkJsf Framework
Jsf Framework
Marimuthu Udayakumar
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF Presentation
Gaurav Dighe
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
zeeshanhanif
 
9. java server faces
9. java server faces9. java server faces
9. java server faces
AnusAhmad
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
TY.BSc.IT Java QB U5
TY.BSc.IT Java QB U5TY.BSc.IT Java QB U5
TY.BSc.IT Java QB U5
Lokesh Singrol
 
TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6
Lokesh Singrol
 
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
 
Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topics
Guy Nir
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
Guo Albert
 
TY.BSc.IT Java QB U6
TY.BSc.IT Java QB U6TY.BSc.IT Java QB U6
TY.BSc.IT Java QB U6
Lokesh Singrol
 
Struts course material
Struts course materialStruts course material
Struts course material
Vibrant Technologies & Computers
 
Oracle ADF Case Study
Oracle ADF Case StudyOracle ADF Case Study
Oracle ADF Case Study
Jean-Marc Desvaux
 
Spring MVC 3.0 Framework
Spring MVC 3.0 FrameworkSpring MVC 3.0 Framework
Spring MVC 3.0 Framework
Ravi Kant Soni ([email protected])
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
Emprovise
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
dasguptahirak
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component Behaviors
Andy Schwartz
 
Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
guest764934
 
Sun JSF Presentation
Sun JSF PresentationSun JSF Presentation
Sun JSF Presentation
Gaurav Dighe
 
9. java server faces
9. java server faces9. java server faces
9. java server faces
AnusAhmad
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
Tuna Tore
 
TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6TY.BSc.IT Java QB U5&6
TY.BSc.IT Java QB U5&6
Lokesh Singrol
 
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
 
Spring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topicsSpring 3.x - Spring MVC - Advanced topics
Spring 3.x - Spring MVC - Advanced topics
Guy Nir
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
Guo Albert
 

Viewers also liked (13)

EJB 3.0 and J2EE
EJB 3.0 and J2EEEJB 3.0 and J2EE
EJB 3.0 and J2EE
Aniruddha Ray (Ani)
 
Maven (EN ESPANOL)
Maven (EN ESPANOL)Maven (EN ESPANOL)
Maven (EN ESPANOL)
Rodrigo Branas
 
Java desde cero maven
Java desde cero mavenJava desde cero maven
Java desde cero maven
www.mentoringit.com.mx
 
Curso Arquitectura J2 Ee Parte1
Curso Arquitectura J2 Ee Parte1Curso Arquitectura J2 Ee Parte1
Curso Arquitectura J2 Ee Parte1
AndresGuerreroG
 
Et pourquoi pas JEE ?
Et pourquoi pas JEE ?Et pourquoi pas JEE ?
Et pourquoi pas JEE ?
PALO IT
 
Ejb 2.0
Ejb 2.0Ejb 2.0
Ejb 2.0
sukace
 
Mainframe - OPC
Mainframe -  OPCMainframe -  OPC
Mainframe - OPC
Srinimf-Slides
 
Mainframe Application Modernization for Enterprise Developers
Mainframe Application Modernization for Enterprise DevelopersMainframe Application Modernization for Enterprise Developers
Mainframe Application Modernization for Enterprise Developers
CA Technologies
 
Basics of IBM Tivoli Storage Manager
Basics of IBM Tivoli Storage ManagerBasics of IBM Tivoli Storage Manager
Basics of IBM Tivoli Storage Manager
imagineers7
 
Mainframe Architecture & Product Overview
Mainframe Architecture & Product OverviewMainframe Architecture & Product Overview
Mainframe Architecture & Product Overview
abhi1112
 
Mainframe
MainframeMainframe
Mainframe
Kanika Kapoor
 
Enterprise modernization: improving the economics of mainframe and multi-plat...
Enterprise modernization: improving the economics of mainframe and multi-plat...Enterprise modernization: improving the economics of mainframe and multi-plat...
Enterprise modernization: improving the economics of mainframe and multi-plat...
IBM Rational software
 
Mainframe modernization powered by AI
Mainframe modernization powered by AIMainframe modernization powered by AI
Mainframe modernization powered by AI
Infosys
 
Curso Arquitectura J2 Ee Parte1
Curso Arquitectura J2 Ee Parte1Curso Arquitectura J2 Ee Parte1
Curso Arquitectura J2 Ee Parte1
AndresGuerreroG
 
Et pourquoi pas JEE ?
Et pourquoi pas JEE ?Et pourquoi pas JEE ?
Et pourquoi pas JEE ?
PALO IT
 
Ejb 2.0
Ejb 2.0Ejb 2.0
Ejb 2.0
sukace
 
Mainframe Application Modernization for Enterprise Developers
Mainframe Application Modernization for Enterprise DevelopersMainframe Application Modernization for Enterprise Developers
Mainframe Application Modernization for Enterprise Developers
CA Technologies
 
Basics of IBM Tivoli Storage Manager
Basics of IBM Tivoli Storage ManagerBasics of IBM Tivoli Storage Manager
Basics of IBM Tivoli Storage Manager
imagineers7
 
Mainframe Architecture & Product Overview
Mainframe Architecture & Product OverviewMainframe Architecture & Product Overview
Mainframe Architecture & Product Overview
abhi1112
 
Enterprise modernization: improving the economics of mainframe and multi-plat...
Enterprise modernization: improving the economics of mainframe and multi-plat...Enterprise modernization: improving the economics of mainframe and multi-plat...
Enterprise modernization: improving the economics of mainframe and multi-plat...
IBM Rational software
 
Mainframe modernization powered by AI
Mainframe modernization powered by AIMainframe modernization powered by AI
Mainframe modernization powered by AI
Infosys
 
Ad

Similar to Introduction to JSF (20)

Spring MVC
Spring MVCSpring MVC
Spring MVC
yuvalb
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran Toch
Adil Jafri
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
cagataycivici
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)
Roger Kitain
 
Jsp
JspJsp
Jsp
DSKUMAR G
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
BG Java EE Course
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
Timothy Perrett
 
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developersjBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
Kris Verlaenen
 
What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0
Michael Fons
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
Jonas Follesø
 
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
Roger Kitain
 
Jsp 01
Jsp 01Jsp 01
Jsp 01
Subhasis Nayak
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
Yiguang Hu
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
wiradikusuma
 
Facelets
FaceletsFacelets
Facelets
lingli1031
 
Boston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesBoston Computing Review - Java Server Pages
Boston Computing Review - Java Server Pages
John Brunswick
 
I Feel Pretty
I Feel PrettyI Feel Pretty
I Feel Pretty
John Quaglia
 
Facelets
FaceletsFacelets
Facelets
cagataycivici
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
ipolevoy
 
Developing web apps using Java and the Play framework
Developing web apps using Java and the Play frameworkDeveloping web apps using Java and the Play framework
Developing web apps using Java and the Play framework
Victor Porof
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
yuvalb
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran Toch
Adil Jafri
 
Devoxx 09 (Belgium)
Devoxx 09 (Belgium)Devoxx 09 (Belgium)
Devoxx 09 (Belgium)
Roger Kitain
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
BG Java EE Course
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
Timothy Perrett
 
jBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developersjBPM5 in action - a quickstart for developers
jBPM5 in action - a quickstart for developers
Kris Verlaenen
 
What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0
Michael Fons
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
Jonas Follesø
 
JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)JSF 2.0 (JavaEE Webinar)
JSF 2.0 (JavaEE Webinar)
Roger Kitain
 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
Yiguang Hu
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
wiradikusuma
 
Boston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesBoston Computing Review - Java Server Pages
Boston Computing Review - Java Server Pages
John Brunswick
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
ipolevoy
 
Developing web apps using Java and the Play framework
Developing web apps using Java and the Play frameworkDeveloping web apps using Java and the Play framework
Developing web apps using Java and the Play framework
Victor Porof
 
Ad

More from SoftServe (18)

Go Mobile! Windows Phone 7 for all
Go Mobile! Windows Phone 7 for all Go Mobile! Windows Phone 7 for all
Go Mobile! Windows Phone 7 for all
SoftServe
 
Agile frameworks
Agile frameworksAgile frameworks
Agile frameworks
SoftServe
 
Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...
SoftServe
 
There is time for rest
There is time for rest There is time for rest
There is time for rest
SoftServe
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe
 
AGILE? YES!
AGILE? YES!AGILE? YES!
AGILE? YES!
SoftServe
 
Engineering practices within scrum
Engineering practices within scrumEngineering practices within scrum
Engineering practices within scrum
SoftServe
 
Distributed scrum keys to success
Distributed scrum keys to successDistributed scrum keys to success
Distributed scrum keys to success
SoftServe
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
SoftServe
 
Mono project
Mono project Mono project
Mono project
SoftServe
 
Social networks plus software developers
Social networks plus software developersSocial networks plus software developers
Social networks plus software developers
SoftServe
 
Project Management . The Change Agent
Project Management . The Change AgentProject Management . The Change Agent
Project Management . The Change Agent
SoftServe
 
Project Management . The Change Agent Vijay Prasad M.Tech, PMP
Project Management . The Change Agent Vijay Prasad M.Tech, PMPProject Management . The Change Agent Vijay Prasad M.Tech, PMP
Project Management . The Change Agent Vijay Prasad M.Tech, PMP
SoftServe
 
Project Management -Strategic Competency, & Trends
Project Management -Strategic Competency, & TrendsProject Management -Strategic Competency, & Trends
Project Management -Strategic Competency, & Trends
SoftServe
 
Mobile augmented reality
Mobile augmented realityMobile augmented reality
Mobile augmented reality
SoftServe
 
SoftServe - the difference is you! join professionals!
SoftServe - the difference is you! join professionals!SoftServe - the difference is you! join professionals!
SoftServe - the difference is you! join professionals!
SoftServe
 
Object oriented reality
Object oriented realityObject oriented reality
Object oriented reality
SoftServe
 
Pmo, project objectives and project life cycles
Pmo, project objectives and project life cyclesPmo, project objectives and project life cycles
Pmo, project objectives and project life cycles
SoftServe
 
Go Mobile! Windows Phone 7 for all
Go Mobile! Windows Phone 7 for all Go Mobile! Windows Phone 7 for all
Go Mobile! Windows Phone 7 for all
SoftServe
 
Agile frameworks
Agile frameworksAgile frameworks
Agile frameworks
SoftServe
 
Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...Managed Extensibility Framework or Effective Development of Scalable Applicat...
Managed Extensibility Framework or Effective Development of Scalable Applicat...
SoftServe
 
There is time for rest
There is time for rest There is time for rest
There is time for rest
SoftServe
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe
 
Engineering practices within scrum
Engineering practices within scrumEngineering practices within scrum
Engineering practices within scrum
SoftServe
 
Distributed scrum keys to success
Distributed scrum keys to successDistributed scrum keys to success
Distributed scrum keys to success
SoftServe
 
Windows Communication Foundation
Windows Communication FoundationWindows Communication Foundation
Windows Communication Foundation
SoftServe
 
Mono project
Mono project Mono project
Mono project
SoftServe
 
Social networks plus software developers
Social networks plus software developersSocial networks plus software developers
Social networks plus software developers
SoftServe
 
Project Management . The Change Agent
Project Management . The Change AgentProject Management . The Change Agent
Project Management . The Change Agent
SoftServe
 
Project Management . The Change Agent Vijay Prasad M.Tech, PMP
Project Management . The Change Agent Vijay Prasad M.Tech, PMPProject Management . The Change Agent Vijay Prasad M.Tech, PMP
Project Management . The Change Agent Vijay Prasad M.Tech, PMP
SoftServe
 
Project Management -Strategic Competency, & Trends
Project Management -Strategic Competency, & TrendsProject Management -Strategic Competency, & Trends
Project Management -Strategic Competency, & Trends
SoftServe
 
Mobile augmented reality
Mobile augmented realityMobile augmented reality
Mobile augmented reality
SoftServe
 
SoftServe - the difference is you! join professionals!
SoftServe - the difference is you! join professionals!SoftServe - the difference is you! join professionals!
SoftServe - the difference is you! join professionals!
SoftServe
 
Object oriented reality
Object oriented realityObject oriented reality
Object oriented reality
SoftServe
 
Pmo, project objectives and project life cycles
Pmo, project objectives and project life cyclesPmo, project objectives and project life cycles
Pmo, project objectives and project life cycles
SoftServe
 

Recently uploaded (20)

Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 

Introduction to JSF

  • 2. ObjectiveUnderstand the basic concepts of Java Server Faces (JSF) Technology.
  • 3. AgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
  • 4. JSF (JavaServer Faces) Framework Is…A server side user interface component framework for Java technology-based web applicationsF-35 JSF Joint Strike Fighter
  • 5. Ok, but what JSF really is?A specification and reference implementation for a web application development frameworkComponentsEventsValidators & convertersNavigationBack-end-data integrationLocalizationError Handling
  • 6. But why JSF?StandardHuge vendor and industry supportMVC for web applicationsClean separation of rolesEasy to useExtendable Component and Rendering architectureSupport for client device independence
  • 7. AgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
  • 9. Request Processing Lifecycle PhasesRestore component tree phaseApply request values phaseProcess validations phaseUpdate model values phaseInvoke application phaseRender response phase
  • 10. Request Processing Lifecycle PhasesSubmitted form values stored in component
  • 11. Component values are convertedComponent tree retrievedRestoreViewRequestComponent valuesvalidatedComponent valuesbound to backing beanApplyRequestValuesProcessValidationsEvents handled
  • 13. Navigation calculatedUpdateModel ValuesInvokeApplicationRenderResponseResponseComponent values are updated from backing bean propertiesSystem-level phaseApplication-level phase
  • 14. AgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
  • 15. User Interface Component ModelUI componentsEvent handling modelConversion and Validation modelRendering modelPage navigation support
  • 16. UI ComponentsUIComponent/UIComponentBaseBase class for all user interface componentsStandard UIComponent SubclassesUICommand, UIForm, UIOutputUIGraphic, UIInput, UIPanel, UIParameterUISelectBoolean, UISelectMany, UISelectOneExample<h:inputTextid="Key"value="#{message.key}" required="true"rendered="#{resBean.editModeRow}"/>ValidatorsValidators – pluggable validation on UIInput valuesJSF provides implementation for common classes (String reg. exp. validator, decimal range validator etc.)Can apply one or more per componentEasy to create custom validatorsImplement interface and
  • 17. public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException;Example<h:inputTextvalue="#{message.key}" required="true"rendered="#{resBean.editModeRow}“> <f:validateLengthmaximum="15"minimum="6"/></h:inputText>ConvertersConverters – pluggable conversion mechanismJSF provides implementation for common classes (Integer, Date etc.)
  • 18. Easy to create custom convertersImplement interface and Output: Object to String
  • 19. Input: String to ObjectExample<h:inputTextid="Key"value="#{testBean.today}" converter=“CustomDateConverter"/>Rendering ModelRenderers-Adapt components to a specific markup languageDecoding
  • 20. EncodingRenderKits—Library of RenderersMap component classes to component tags
  • 21. Is a custom tag library
  • 22. Basic HTML RenderKitEvents and ListenersStandard events and listenersActionEvent—UICommand component activated by the user
  • 23. ValueChangedEvent—UIInput component whose value was just changedSystem eventsPossibility to work with PhaseEvents and PhaseListeners
  • 24. Global and component system events - UIComponent.subscribeToEvent() or <f:event> tag.Navigation ModelApplication developer responsibilityDefined in Application configuration file (faces-config.xml)
  • 25. Or implicitly (since JSF 2.0)Navigation rulesDetermine which page to go
  • 26. Navigation caseNavigation Model Sample<navigation-rule> <from-view-id>/wizard/item.jsp</from-view-id> <navigation-case> <from-outcome>wizardIndex</from-outcome> <to-view-id>/wizerd/start.jsp</to-view-id></navigation-case> <navigation-case> <from-outcome>goBack</from-outcome> <to-view-id>/wizard/cat3.jsp</to-view-id> </navigation-case> </navigation-rule>
  • 27. AgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
  • 28. What’s new?FaceletsView Declaration LanguageAnnotation based configurationStandardized AjaxImplicit NavigationScopes (conversation, view, flash, custom)Composite ComponentsBean Validation SupportError Handlingmore - resource loading, improved GET support, behaviors, tree visiting, system events and many more (out of scope)
  • 29. Facelets, Annotations, ScopesFacelets are used by default instead of JSP.Annotation based configuration@ManagedBean, @...Scoped, @FacesConverter, @FacesValidator etc.New scopesView – state is preserved for the view (URL).
  • 31. CustomStandardized AjaxTwo ways to useJavaScript API - jsf.ajax.request()
  • 33. Composite ComponentsDefine<html xmlns="http://www.w3.org/1999/xhtml"xmlns:h="http://java.sun.com/jsf/html" xmlns:composite="http://java.sun.com/jsf/composite"><h:head></h:head><h:body> <composite:interface> <composite:attributename="who"/> </composite:interface> <composite:implementation> <h:outputTextvalue="Hello, #{cc.attrs.who}!"/> </composite:implementation> </h:body></html>Use<html xmlns="http://www.w3.org/1999/xhtml"xmlns:h="http://java.sun.com/jsf/html"xmlns:greet="http://java.sun.com/jsf/composite/greet"><greet:hellowho="World"/></html>
  • 34. Navigation, Bean Validation Support, Error HandlingImplicit Navigation.check for explicit navigation ruleschecks to whether the action outcome corresponds to a view id. If yes navigate to view.Bean Validation SupportOOTB JSR 303 support (@NotNull, @Length, etc.)Error HandlingExceptionHandler API for “global” or “central” exception handling activitiesAgendaWhat is JSF and why JSF?Architecture OverviewUI Component ModelSummary of new features in JSF 2Development Steps
  • 35. Steps in Development ProcessDevelop model objects which hold the dataRegister model objects (managed bean) in faces-config.xml or use annotationsCreate Pages using UI component and core tagsDefine Page Navigation in faces-config.xml or use implicit navigationConfigure web.xml
  • 36. Step 1:Develop model Objects(Managed Bean)The model (M) in MVCA regular JavaBeans with read/write propertiesMay contain application methods and event handlersUse to hold data from a UI (page)Creation and lifetime is managed by JSF runtimeapplication, session, requestJSF keeps the bean's data in sync with the UIdata binding by means of ELStep 2:Register model objects@ManagedBean(name = "appPreferences")@RequestScopedpublicclassAppPreferences {@ManagedProperty("#{persistenceThemeManager}")privateThemeManagerthemeManager;private String theme;// getters and setterspublicList<SelectItem> getThemesSelectItems() …publicvoidsaveTheme() {themeManager.saveTenantTheme(selectedTheme); }}Register this class as a request scoped managed beanModel’s dataAction handler
  • 37. Step 3: Create JSF Page
  • 38. Binding UI to Managed BeaneditUser.xhtml<h:inputTextvalue="#{userEditBean.firstName}" required="true"/>EditUserBean.java@ManagedBean(name = "userEditBean")@SessionScopedpublicclassEditUserBean { public String getFirstName() {…} public void setFirstName(String firstName) { … }
  • 39. Step 4: Define Page Navigation Rules<h:commandButtonaction="goBack" image="../images/back-arrow-small.png"/> <h:commandButtonvalue="LookupPrices"action="#{multiCategorySelectBackingBean.lookupPrices}"/>Web PageBacking Beanpublic String lookupPrices() {...return "showPriceRecs";}<navigation-rule> <from-view-id>/wizard/item.jsp</from-view-id> <navigation-case> <from-outcome>showPriceRecs</from-outcome> <to-view-id>/wizard/pricesResult.jsp</to-view-id></navigation-case> <navigation-case> <from-outcome>goBack</from-outcome> <to-view-id>/wizard/start.jsp</to-view-id> </navigation-case> </navigation-rule>faces-config.xml
  • 40. Step 5: Configure (web.xml)Add<servlet><servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup></servlet><servlet-mapping> <servlet-name>FacesServlet</servlet-name> <url-pattern>*.jsf</url-pattern></servlet-mapping>May be not necessary with Servlets 3.0 compliant container