SlideShare a Scribd company logo
1 of 26
Java Server Faces
Agenda
 What is JSF?
 JSF Component Model and Binding mechanism
 JSF Request Lifecycle
 IOC and Managed Beans
 Navigations
 Internalization and Resource Bundles
 Extending JSF
 Integration with Other Frameworks (Spring Framework
Example)
 Ajax with JSF
 Facelets
 Apache MyFaces
 IDE Support
 Future of JSF
 Questions
What is JSF?
 a component oriented and event
driven web framework to build up
web applications.
 a Standard
 various implementations
 Sun Reference Implementation
 Apache MyFaces
 Oracle ADF
 IBM
Architecture
Similar Concepts
 Asp.net
 Tapestry
 Wicket
 Swing
JSF vs Struts
 Struts is an action framework
 Controller of the MVC pattern
 JSF is an event driven and component
oriented framework.
 JSF contains all the members of the
MVC.
 Model : Managed Beans
 View : Components
 Controller : Faces Servlet
JSF Component Model
 Covers a wide range components.
 Reusable
 Customizable
 State aware
 Easy to plug in third party components.
 Easy to create custom components of your
own.
 Renderers brings abstraction
Simple Example: HtmlInputText
 Declared as;
 <h:inputText id=“id1” value=“xxx” />
 Gives the output
 <input type=“text”
id=“parentformid:id1” value=“xxx” />
 Customization attributes like;
 Styleclass
 Javascript events (onmousover etc...)
Binding makes JSF powerful
 Value binding; binds a bean’s variable
to a component.
 <h:inputText
value=“#{person.name}” />
 Action binding, binds a method to an
action component.
 <h:commandButton
action=“{personSavePage.savePerson}”
/>
JSF Component Tree
 Components are represented using a tree.
 <f:view>
<h:form id=“form1”>
<h:outputText id=“lbl_name” value=“Name”>
<h:inputText id=“txt_name” value=“NameValue”>
</h:form>
</f:view>
Event Handling
 Events are created based on the
request parameters.
 Each event is broadcasted to the
related listeners.
State Management
 JSF saves and restores the state of
the components in each faces
request.
 Client
 As a hidden variable
 Server
 As a session entry
JSF Request LifeCycle
Conversion and Validation
 Submitted form values are strings
 Conversion takes place to convert
these values to java objects
 Validation mechanism validates these
converted objects
 Built-in converters and validators
 Easy to write custom converters and
validators
Case Study
IOC and Managed Beans
 JSF uses it’s own container to manage the beans in it’s context.
 <managed-bean>
<managed-bean-name>pc_Index</managed-bean-name>
<managed-bean-class>demo.Index</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>someVariable</property-name>
<value>#{pc_DB}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>pc_DB</managed-bean-name>
<managed-bean-class>demo.Db</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
Navigations
 <navigation-rule>
<from-view-id>/login.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/mainmenu.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/login.jsp</to-view-id>
</navigation-case>
</navigation-rule>
 Action specific
 <from-action>#{loginBean.loginAction}</from-action>
 Supports patterns
 <from-view-id>*</from-view-id>
Extending JSF
 Navigation Handler
 View Handler
 Custom Resolvers
 Phaselisteners
 Custom Components
Multilanguage
 Support for resource bundles
 <application>
<locale-config>
<default-locale>tr</default-locale>
<supported-locale>en</supported-locale>
<supported-locale>en_US</supported-locale>
<supported-locale>de</supported-locale>
</locale-config>
<message-bundle>
jsfsunum.messages
</message-bundle>
</application>
 jsfsunum/messages.tr
 msg_welcome = Merhaba
 Bundles on faces pages
 <f:loadBundle basename=“jsfsunum.labels" var="msg"/>
Integration with Spring
 JSF-Spring
 Using a delegating variable resolver
 <application>
<variable-resolver>
org.springframework.web.jsf.DelegatingVariableResolver
</variable-resolver>;
</application>
<managed-bean>
<managed-bean-name>backingBeanName</managed-bean-name>
<managed-bean-class>
yourpackagename.backingBeanClass
</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>facadeService</property-name>
<property-class>
packagename.FacadeService
</property-class>
<value>#{facadeService}</value>
</managed-property>
</managed-bean>
Ajax with JSF
 Components with ajax support
 JSF ajax frameworks
 JSF Avatar
 Ajax Anywhere
 Ajax4jsf
 IceFaces
 Ajax enabled myFaces components
Facelets
 Replacing jsp markup with xhtml
 Templating
 Composite components
 Powerful view handler than jsf 1.1
 No need for tag handlers of jsp
JSF IDE Support
 Exadel Studio
 IBM RSA
 Oracle JDeveloper
 Sun Studio Creator
 MyEclipse
 Bea Workshop
 Macromedia jsftoolbox
 Netbeans
Introducing Apache MyFaces
 Open source implementation of JSF
 Contains extended tomahawk library
 Oracle ADF donation
MyFaces Component Demo
 Basic form components
 Datatable
 File upload
 Date and Calendar
 Jscookmenu
 Schedule
 Accordion panel
 Tabbed Panel
 Ajax components
 Tree
 Dojo Toolkit
 Fisheye
 Html Editor
 Chart Creator (jsf-comp component)
Future
 JSF 1.2 and later JSF 2.0
 More powerful IDE support
 More components
 Integrated Ajax Support

More Related Content

What's hot

MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
Just a View: An Introduction To Model-View-Controller Pattern
Just a View:  An Introduction To Model-View-Controller PatternJust a View:  An Introduction To Model-View-Controller Pattern
Just a View: An Introduction To Model-View-Controller PatternAaron Nordyke
 
MVC with Zend Framework
MVC with Zend FrameworkMVC with Zend Framework
MVC with Zend Frameworkwebholics
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by GoogleASG
 
Spring db-access mod03
Spring db-access mod03Spring db-access mod03
Spring db-access mod03Guo Albert
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS Hamed Farag
 
Zend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applicationsZend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applicationsEtisbew Technology Group
 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issuesPrashant Seth
 
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 HTML5Tuna Tore
 
Building Web Applications with Zend Framework
Building Web Applications with Zend FrameworkBuilding Web Applications with Zend Framework
Building Web Applications with Zend FrameworkPhil Brown
 
Spring MVC Architecture Tutorial
Spring MVC Architecture TutorialSpring MVC Architecture Tutorial
Spring MVC Architecture TutorialJava Success Point
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkDineesha Suraweera
 

What's hot (20)

MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Introduction to struts
Introduction to strutsIntroduction to struts
Introduction to struts
 
Struts ppt 1
Struts ppt 1Struts ppt 1
Struts ppt 1
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Just a View: An Introduction To Model-View-Controller Pattern
Just a View:  An Introduction To Model-View-Controller PatternJust a View:  An Introduction To Model-View-Controller Pattern
Just a View: An Introduction To Model-View-Controller Pattern
 
MVC with Zend Framework
MVC with Zend FrameworkMVC with Zend Framework
MVC with Zend Framework
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
 
Spring db-access mod03
Spring db-access mod03Spring db-access mod03
Spring db-access mod03
 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS
 
Zend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applicationsZend MVC pattern based Framework – Best for Enterprise web applications
Zend MVC pattern based Framework – Best for Enterprise web applications
 
Struts 1
Struts 1Struts 1
Struts 1
 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issues
 
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
 
Building Web Applications with Zend Framework
Building Web Applications with Zend FrameworkBuilding Web Applications with Zend Framework
Building Web Applications with Zend Framework
 
Overview Of JDBC
Overview Of JDBCOverview Of JDBC
Overview Of JDBC
 
Spring MVC Architecture Tutorial
Spring MVC Architecture TutorialSpring MVC Architecture Tutorial
Spring MVC Architecture Tutorial
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Struts Basics
Struts BasicsStruts Basics
Struts Basics
 

Viewers also liked

Revista inclusão 7
Revista inclusão 7Revista inclusão 7
Revista inclusão 7Edson Silva
 
Presente Continuo
Presente ContinuoPresente Continuo
Presente Continuoanicahe
 
Album poster moodboard
Album poster moodboardAlbum poster moodboard
Album poster moodboardJockHayrise
 
Science and Technology Studies presentation
Science and Technology Studies presentationScience and Technology Studies presentation
Science and Technology Studies presentationTori Roggen
 
Materi bahasa indonesia kelas 1 semester 1
Materi bahasa indonesia kelas 1 semester 1Materi bahasa indonesia kelas 1 semester 1
Materi bahasa indonesia kelas 1 semester 1atimaschur
 

Viewers also liked (7)

Inglés
InglésInglés
Inglés
 
Revista inclusão 7
Revista inclusão 7Revista inclusão 7
Revista inclusão 7
 
El indulto
El indultoEl indulto
El indulto
 
Presente Continuo
Presente ContinuoPresente Continuo
Presente Continuo
 
Album poster moodboard
Album poster moodboardAlbum poster moodboard
Album poster moodboard
 
Science and Technology Studies presentation
Science and Technology Studies presentationScience and Technology Studies presentation
Science and Technology Studies presentation
 
Materi bahasa indonesia kelas 1 semester 1
Materi bahasa indonesia kelas 1 semester 1Materi bahasa indonesia kelas 1 semester 1
Materi bahasa indonesia kelas 1 semester 1
 

Similar to JSF Java Server Faces Overview

Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Fahad Golra
 
JSF basics
JSF basicsJSF basics
JSF basicsairbo
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJosh Juneau
 
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
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts frameworks4al_com
 
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 TenDavid Chandler
 
Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2Rajiv Gupta
 
Spring_Course_Content
Spring_Course_ContentSpring_Course_Content
Spring_Course_ContentMV Solutions
 
Greate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADFGreate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADFMohamed Shahpoup
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsBG Java EE Course
 
JSF and Seam
JSF and SeamJSF and Seam
JSF and Seamyuvalb
 
Complete java syllabus 7448062045 Yesdo Sddd
Complete java syllabus 7448062045 Yesdo SdddComplete java syllabus 7448062045 Yesdo Sddd
Complete java syllabus 7448062045 Yesdo SdddYesdo Softindia Pvt Ltd
 

Similar to JSF Java Server Faces Overview (20)

Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
 
Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)Lecture 10 - Java Server Faces (JSF)
Lecture 10 - Java Server Faces (JSF)
 
Jsf
JsfJsf
Jsf
 
Jsf 2
Jsf 2Jsf 2
Jsf 2
 
JSF basics
JSF basicsJSF basics
JSF basics
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVC
 
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
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Spring
SpringSpring
Spring
 
jsf2 Notes
jsf2 Notesjsf2 Notes
jsf2 Notes
 
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
 
MVC
MVCMVC
MVC
 
Introduction to jsf2
Introduction to jsf2Introduction to jsf2
Introduction to jsf2
 
Spring_Course_Content
Spring_Course_ContentSpring_Course_Content
Spring_Course_Content
 
Greate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADFGreate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADF
 
Jsf
JsfJsf
Jsf
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
JSF and Seam
JSF and SeamJSF and Seam
JSF and Seam
 
Complete java syllabus 7448062045 Yesdo Sddd
Complete java syllabus 7448062045 Yesdo SdddComplete java syllabus 7448062045 Yesdo Sddd
Complete java syllabus 7448062045 Yesdo Sddd
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 

More from Manav Prasad (20)

Experience with mulesoft
Experience with mulesoftExperience with mulesoft
Experience with mulesoft
 
Mulesoftconnectors
MulesoftconnectorsMulesoftconnectors
Mulesoftconnectors
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 
Mulesoft cloudhub
Mulesoft cloudhubMulesoft cloudhub
Mulesoft cloudhub
 
Perl tutorial
Perl tutorialPerl tutorial
Perl tutorial
 
Hibernate presentation
Hibernate presentationHibernate presentation
Hibernate presentation
 
Jpa
JpaJpa
Jpa
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Json
Json Json
Json
 
Rest introduction
Rest introductionRest introduction
Rest introduction
 
Exceptions in java
Exceptions in javaExceptions in java
Exceptions in java
 
Junit
JunitJunit
Junit
 
Xml parsers
Xml parsersXml parsers
Xml parsers
 
Xpath
XpathXpath
Xpath
 
Xslt
XsltXslt
Xslt
 
Xhtml
XhtmlXhtml
Xhtml
 
Css
CssCss
Css
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Ajax
AjaxAjax
Ajax
 
J query
J queryJ query
J query
 

Recently uploaded

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

JSF Java Server Faces Overview

  • 2. Agenda  What is JSF?  JSF Component Model and Binding mechanism  JSF Request Lifecycle  IOC and Managed Beans  Navigations  Internalization and Resource Bundles  Extending JSF  Integration with Other Frameworks (Spring Framework Example)  Ajax with JSF  Facelets  Apache MyFaces  IDE Support  Future of JSF  Questions
  • 3. What is JSF?  a component oriented and event driven web framework to build up web applications.  a Standard  various implementations  Sun Reference Implementation  Apache MyFaces  Oracle ADF  IBM
  • 5. Similar Concepts  Asp.net  Tapestry  Wicket  Swing
  • 6. JSF vs Struts  Struts is an action framework  Controller of the MVC pattern  JSF is an event driven and component oriented framework.  JSF contains all the members of the MVC.  Model : Managed Beans  View : Components  Controller : Faces Servlet
  • 7. JSF Component Model  Covers a wide range components.  Reusable  Customizable  State aware  Easy to plug in third party components.  Easy to create custom components of your own.  Renderers brings abstraction
  • 8. Simple Example: HtmlInputText  Declared as;  <h:inputText id=“id1” value=“xxx” />  Gives the output  <input type=“text” id=“parentformid:id1” value=“xxx” />  Customization attributes like;  Styleclass  Javascript events (onmousover etc...)
  • 9. Binding makes JSF powerful  Value binding; binds a bean’s variable to a component.  <h:inputText value=“#{person.name}” />  Action binding, binds a method to an action component.  <h:commandButton action=“{personSavePage.savePerson}” />
  • 10. JSF Component Tree  Components are represented using a tree.  <f:view> <h:form id=“form1”> <h:outputText id=“lbl_name” value=“Name”> <h:inputText id=“txt_name” value=“NameValue”> </h:form> </f:view>
  • 11. Event Handling  Events are created based on the request parameters.  Each event is broadcasted to the related listeners.
  • 12. State Management  JSF saves and restores the state of the components in each faces request.  Client  As a hidden variable  Server  As a session entry
  • 14. Conversion and Validation  Submitted form values are strings  Conversion takes place to convert these values to java objects  Validation mechanism validates these converted objects  Built-in converters and validators  Easy to write custom converters and validators
  • 16. IOC and Managed Beans  JSF uses it’s own container to manage the beans in it’s context.  <managed-bean> <managed-bean-name>pc_Index</managed-bean-name> <managed-bean-class>demo.Index</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>someVariable</property-name> <value>#{pc_DB}</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>pc_DB</managed-bean-name> <managed-bean-class>demo.Db</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean>
  • 18. Extending JSF  Navigation Handler  View Handler  Custom Resolvers  Phaselisteners  Custom Components
  • 19. Multilanguage  Support for resource bundles  <application> <locale-config> <default-locale>tr</default-locale> <supported-locale>en</supported-locale> <supported-locale>en_US</supported-locale> <supported-locale>de</supported-locale> </locale-config> <message-bundle> jsfsunum.messages </message-bundle> </application>  jsfsunum/messages.tr  msg_welcome = Merhaba  Bundles on faces pages  <f:loadBundle basename=“jsfsunum.labels" var="msg"/>
  • 20. Integration with Spring  JSF-Spring  Using a delegating variable resolver  <application> <variable-resolver> org.springframework.web.jsf.DelegatingVariableResolver </variable-resolver>; </application> <managed-bean> <managed-bean-name>backingBeanName</managed-bean-name> <managed-bean-class> yourpackagename.backingBeanClass </managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>facadeService</property-name> <property-class> packagename.FacadeService </property-class> <value>#{facadeService}</value> </managed-property> </managed-bean>
  • 21. Ajax with JSF  Components with ajax support  JSF ajax frameworks  JSF Avatar  Ajax Anywhere  Ajax4jsf  IceFaces  Ajax enabled myFaces components
  • 22. Facelets  Replacing jsp markup with xhtml  Templating  Composite components  Powerful view handler than jsf 1.1  No need for tag handlers of jsp
  • 23. JSF IDE Support  Exadel Studio  IBM RSA  Oracle JDeveloper  Sun Studio Creator  MyEclipse  Bea Workshop  Macromedia jsftoolbox  Netbeans
  • 24. Introducing Apache MyFaces  Open source implementation of JSF  Contains extended tomahawk library  Oracle ADF donation
  • 25. MyFaces Component Demo  Basic form components  Datatable  File upload  Date and Calendar  Jscookmenu  Schedule  Accordion panel  Tabbed Panel  Ajax components  Tree  Dojo Toolkit  Fisheye  Html Editor  Chart Creator (jsf-comp component)
  • 26. Future  JSF 1.2 and later JSF 2.0  More powerful IDE support  More components  Integrated Ajax Support

Editor's Notes

  1. RSA Demo
  2. FacesTrace