SlideShare a Scribd company logo
1 of 23
Download to read offline
Apache MyFaces 1.2
         Web Application Development




AUTHOR    : BART KUMMEL
E-MAIL    : BART@BARTKUMMEL.NET
DATE      : MARCH 2010
                                  WWW.TRANSFER-SOLUTIONS.COM
Apache MyFaces 1.2
      Web Application Development
                                      Building Java EE web
                                      applications using:
                                        JSF 1.2
                                        Facelets
                                        Apache MyFaces and
                                        sub projects
                                      Focus on reuse and
                                      maintainability




© COPYRIGHT TRANSFER SOLUTIONS B.V.                          2
Table of Contents

      1.         Introduction         8. Integrating with the
      2.         Getting started          Backend
      3.         Facelets             9. Orchestra
      4.         Tomahawk             10. Extensions Validator
      5.         Trinidad – the       11. Best Practices
                 Basics
      6.         Advanced Trinidad
      7.         Trinidad Skinning
                 and Tuning



© COPYRIGHT TRANSFER SOLUTIONS B.V.                              3
1. Introduction

           Introduces the Apache MyFaces project and all
           of its sub projects:
                 Core
                 Tomahawk
                 Sandbox
                 Trinidad
                 Orchestra
                 Extensions Validator




© COPYRIGHT TRANSFER SOLUTIONS B.V.                        4
2. Getting Started

           Setting up the development environment
                 Detailed instructions for Eclipse and JDeveloper, as
                 well as introduction to the MyFaces Maven
                 archetypes
           Setting up the application server
                 Explaining the common steps that are the same for
                 all Java EE application servers
           Introduction of the example case
                 Throughout the book an example scenario is used to
                 work towards a fully functional application when the
                 book is finished.

© COPYRIGHT TRANSFER SOLUTIONS B.V.                                     5
3. Facelets

           The book starts out with an introduction to
           Facelets
           Facelets is also used in all examples in the rest
           or the book
           Throughout the book we focus on getting the
           most out of the combination of Facelets with the
           MyFaces products
           This makes the book also an excellent resource
           to get started with Facelets


© COPYRIGHT TRANSFER SOLUTIONS B.V.                            6
3. Facelets – ToC

           Why Facelets?
                 This chapter starts by discussing why we should use Facelets
                 instead of JSP in all our projects.
           Templating with Facelets
                 The creation and use of page templates with Facelets is
                 dicussed
           Creating and using composition components
                 Composition components: create your own JSF components by
                 combining existing components
           Other Facelets topics that are discussed in this chapter:
                 Using static functions
                 Using inline texts


© COPYRIGHT TRANSFER SOLUTIONS B.V.                                             7
4. Tomahawk – ToC

           Extended components
           Creating basic data tables
           Using advanced data table features
           Uploading files
           Working with dates and calendars
           Extra validators




© COPYRIGHT TRANSFER SOLUTIONS B.V.             8
5. Trinidad – the Basics – ToC

           Creating data tables
                 Including AJAX-based pagination
           Creating input and edit forms
           File uploading
           Using Trinidad’s hierarchical navigation features
                 Trinidad has a comprehensive navigation framework
                 that is covered in this section
           Creating layouts for our pages
                 Using the many Trinidad layout components



© COPYRIGHT TRANSFER SOLUTIONS B.V.                                  9
6. Advanced Trinidad – ToC (1/2)

           Data visualization
                 Creating nice, SVG-based charts
           Passing on data with page flows
                 Introducing the page flow scope
           Using AJAX and Partial Page Rendering
                 Trinidad has AJAX embedded in every component




© COPYRIGHT TRANSFER SOLUTIONS B.V.                              10
6. Advanced Trinidad – ToC (2/2)

           Creating dialogs
                 Trinidads powerful dialog framework allows us to
                 create dialogs easily
                 We can easily return values from a dialog
           Client-side validation and conversion
                 For the optimal AJAX experience




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                 11
7. Trinidad Skinning and Tuning – ToC

           Skinning                    Tuning
                 Understanding the       Accessibility
                 terminology             Performance
                 Setting up skinning     Debugging
                 Creating a Trinidad     Appearance
                 skin                    Localization
                 Extending skins




© COPYRIGHT TRANSFER SOLUTIONS B.V.                      12
8. Integrating with the Backend

           This chapter shows how we can integrate our
           View layer with a backend.
           Only Java EE standard components are used
           This chapter is just an introduction so we have a
           good basis for chapters 9 and 10




© COPYRIGHT TRANSFER SOLUTIONS B.V.                            13
8. Integrating with the Backend – ToC

           The Model-View-Controller architecture
                 A short recap of the MVC theory
           Setting up the Java EE application structure
                 How to apply MVC on a Java EE application
           Preparing a database environment
           Implementing the Model
           Using the service facade in the View layer
           Limitations and problems
                 The presented aproach has some limitations and
                 problems. MyFaces can fix this!

© COPYRIGHT TRANSFER SOLUTIONS B.V.                               14
9. MyFaces Orchestra

           Managing persistence (database) transactions
           is often a difficult task, especially when
           transactions have to stay open over multiple UI
           page requests
           This chapter shows how we can let Orchestra
           manage the transactions
           Orchestra can guarantee that we have a single
           transaction during a conversation




© COPYRIGHT TRANSFER SOLUTIONS B.V.                          15
9. MyFaces Orchestra – ToC

           Setting up Orchestra
           Using the Orchestra ViewController
           Setting up Orchestra conversations
           Generating forms with DynaForm




© COPYRIGHT TRANSFER SOLUTIONS B.V.             16
10: Extensions Validator

           This is the first book to cover MyFaces ExtVal
           Based on the lastest ExtVal release, that was
           released a few days after the book was
           published
           ExtVal gives us the chance to use JSR 303
           Bean Validation without the need for JSF 2.0




© COPYRIGHT TRANSFER SOLUTIONS B.V.                         17
10: Extensions Validator – ToC (1/2)

           Basic usage – JPA annotations
                 ExtVal can create JSF validators based on JPA
                 annotations in our Model
           Complementing JPA annotations
                 ExtVal has extra annotations if we cannot express
                 our validation rule in JPA annotations
           Applying cross validation
                 If validation of one field depends on a value in
                 another field




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                  18
10: Extensions Validator – ToC (2/2)

           Creating custom error messages
           Creating our own validation strategy
                 This use case is used to show the flexibility and
                 extendability of ExtVal
           Extending ExtVal with add-ons
           Using Bean Validation
                 Instead of JPA or ExtVal annotations, we can also
                 use Bean Validation (JSR 303) annotations




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                  19
10: Extensions Validator

           On the website of Packt Publishing, a series of
           articles on ExtVal is published:
                 Apache MyFaces Extensions Validator
                 Customizing and Extending Apache MyFaces ExtVal
                 Using Bean Validation (JSR 303) annotations with
                 Apache MyFaces 1.2




© COPYRIGHT TRANSFER SOLUTIONS B.V.                                 20
11: Best Practices – ToC

           Preventing direct access to page definitions
           Using container-managed security with JSF
           Using component bindings wisely
           Keeping the state of a component




© COPYRIGHT TRANSFER SOLUTIONS B.V.                       21
Apache MyFaces 1.2
      Web Application Development
                                      author:
                                      Bart Kummel
                                      isbn:
                                      978-1-847193-25-4
                                      publisher:
                                      Packt Publishing
                                      408 pages,
                                      paperback or e-book



© COPYRIGHT TRANSFER SOLUTIONS B.V.                         22
Apache MyFaces 1.2
      Web Application Development
           order via: http://tinyurl.com/am12wad
           author’s website: http://www.bartkummel.net




© COPYRIGHT TRANSFER SOLUTIONS B.V.                      23

More Related Content

What's hot

Java EE Technical Keynote at JavaOne Latin America 2011
Java EE Technical Keynote at JavaOne Latin America 2011Java EE Technical Keynote at JavaOne Latin America 2011
Java EE Technical Keynote at JavaOne Latin America 2011Arun Gupta
 
Advanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQAdvanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQdejanb
 
The Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudThe Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudArun Gupta
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureIndicThreads
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureArun Gupta
 
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...Graham Charters
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
Modules all the way down: OSGi and the Java Platform Module System
Modules all the way down: OSGi and the Java Platform Module SystemModules all the way down: OSGi and the Java Platform Module System
Modules all the way down: OSGi and the Java Platform Module SystemTim Ellison
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMPaulThwaite
 
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...PaulThwaite
 
03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book Supplement03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book SupplementChuong Nguyen
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFrançois Le Droff
 
Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Amit Naik
 
01.egovFrame Training Book I
01.egovFrame Training Book I01.egovFrame Training Book I
01.egovFrame Training Book IChuong Nguyen
 
Mike Taulty Wpf Dev Days
Mike Taulty Wpf Dev DaysMike Taulty Wpf Dev Days
Mike Taulty Wpf Dev Daysukdpe
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training bookChuong Nguyen
 
Serving Applications with Silverlight Streaming by Windows Live
Serving Applications with Silverlight Streaming by Windows LiveServing Applications with Silverlight Streaming by Windows Live
Serving Applications with Silverlight Streaming by Windows Livegoodfriday
 
The Power of Enterprise Java Frameworks
The Power of Enterprise Java FrameworksThe Power of Enterprise Java Frameworks
The Power of Enterprise Java FrameworksClarence Ho
 

What's hot (19)

Java EE Technical Keynote at JavaOne Latin America 2011
Java EE Technical Keynote at JavaOne Latin America 2011Java EE Technical Keynote at JavaOne Latin America 2011
Java EE Technical Keynote at JavaOne Latin America 2011
 
Advanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQAdvanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQ
 
The Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the CloudThe Java EE 7 Platform: Developing for the Cloud
The Java EE 7 Platform: Developing for the Cloud
 
Java EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The FutureJava EE 6 : Paving The Path For The Future
Java EE 6 : Paving The Path For The Future
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for future
 
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...
Hints and Tips for Modularizing Existing Enterprise Applications (OSGi Commun...
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
Modules all the way down: OSGi and the Java Platform Module System
Modules all the way down: OSGi and the Java Platform Module SystemModules all the way down: OSGi and the Java Platform Module System
Modules all the way down: OSGi and the Java Platform Module System
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVM
 
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
 
03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book Supplement03.eGovFrame Runtime Environment Training Book Supplement
03.eGovFrame Runtime Environment Training Book Supplement
 
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog CcFlex For Java Architects Ledroff Breizh Jug V Blog Cc
Flex For Java Architects Ledroff Breizh Jug V Blog Cc
 
Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5Java EE 7 - Embracing the Cloud and HTML 5
Java EE 7 - Embracing the Cloud and HTML 5
 
Jboss
JbossJboss
Jboss
 
01.egovFrame Training Book I
01.egovFrame Training Book I01.egovFrame Training Book I
01.egovFrame Training Book I
 
Mike Taulty Wpf Dev Days
Mike Taulty Wpf Dev DaysMike Taulty Wpf Dev Days
Mike Taulty Wpf Dev Days
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training book
 
Serving Applications with Silverlight Streaming by Windows Live
Serving Applications with Silverlight Streaming by Windows LiveServing Applications with Silverlight Streaming by Windows Live
Serving Applications with Silverlight Streaming by Windows Live
 
The Power of Enterprise Java Frameworks
The Power of Enterprise Java FrameworksThe Power of Enterprise Java Frameworks
The Power of Enterprise Java Frameworks
 

Viewers also liked

Declarative Input Validation with JSR 303 and ExtVal
Declarative Input Validation with JSR 303 and ExtValDeclarative Input Validation with JSR 303 and ExtVal
Declarative Input Validation with JSR 303 and ExtValBart Kummel
 
Declarative input validation with JSR 303 and ExtVal
Declarative input validation with JSR 303 and ExtVal Declarative input validation with JSR 303 and ExtVal
Declarative input validation with JSR 303 and ExtVal Bart Kummel
 
Simple Scala DSLs
Simple Scala DSLsSimple Scala DSLs
Simple Scala DSLslinxbetter
 
A Field Guide to DSL Design in Scala
A Field Guide to DSL Design in ScalaA Field Guide to DSL Design in Scala
A Field Guide to DSL Design in ScalaTomer Gabel
 
Implementing External DSLs Using Scala Parser Combinators
Implementing External DSLs Using Scala Parser CombinatorsImplementing External DSLs Using Scala Parser Combinators
Implementing External DSLs Using Scala Parser CombinatorsTim Dalton
 
Client+server side bean validation
Client+server side bean validationClient+server side bean validation
Client+server side bean validationAleksandr Zhuikov
 

Viewers also liked (7)

Declarative Input Validation with JSR 303 and ExtVal
Declarative Input Validation with JSR 303 and ExtValDeclarative Input Validation with JSR 303 and ExtVal
Declarative Input Validation with JSR 303 and ExtVal
 
Declarative input validation with JSR 303 and ExtVal
Declarative input validation with JSR 303 and ExtVal Declarative input validation with JSR 303 and ExtVal
Declarative input validation with JSR 303 and ExtVal
 
Simple Scala DSLs
Simple Scala DSLsSimple Scala DSLs
Simple Scala DSLs
 
A Field Guide to DSL Design in Scala
A Field Guide to DSL Design in ScalaA Field Guide to DSL Design in Scala
A Field Guide to DSL Design in Scala
 
Implementing External DSLs Using Scala Parser Combinators
Implementing External DSLs Using Scala Parser CombinatorsImplementing External DSLs Using Scala Parser Combinators
Implementing External DSLs Using Scala Parser Combinators
 
Git glossary
Git glossaryGit glossary
Git glossary
 
Client+server side bean validation
Client+server side bean validationClient+server side bean validation
Client+server side bean validation
 

Similar to Apache MyFaces 1.2 Web Application Development

Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseMatt Raible
 
ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEsoftTech
 
How can Liferay Developers, Deployers move to the Cloud
How can Liferay Developers, Deployers move to the CloudHow can Liferay Developers, Deployers move to the Cloud
How can Liferay Developers, Deployers move to the CloudCloudBees
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC SeminarJohn Lewis
 
vSphere with Tanzu Tech Overview 7.0 U1 (1).pptx
vSphere with Tanzu Tech Overview 7.0 U1 (1).pptxvSphere with Tanzu Tech Overview 7.0 U1 (1).pptx
vSphere with Tanzu Tech Overview 7.0 U1 (1).pptxhokismen
 
Vue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrareVue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrareAndrea Campaci
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questionspraveen_guda
 
WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6Jeffrey West
 
Maven 3: New Features - OPITZ CONSULTING - Stefan Scheidt
Maven 3: New Features - OPITZ CONSULTING - Stefan ScheidtMaven 3: New Features - OPITZ CONSULTING - Stefan Scheidt
Maven 3: New Features - OPITZ CONSULTING - Stefan ScheidtOPITZ CONSULTING Deutschland
 
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Codemotion
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overviewsbobde
 
Deploying Kafka on vSphere with Kubernetes Using the Confluent Operator (Just...
Deploying Kafka on vSphere with Kubernetes Using the Confluent Operator (Just...Deploying Kafka on vSphere with Kubernetes Using the Confluent Operator (Just...
Deploying Kafka on vSphere with Kubernetes Using the Confluent Operator (Just...confluent
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...Fwdays
 
Using Red Hat JBoss Fuse on OpenShift
Using Red Hat JBoss Fuse on OpenShiftUsing Red Hat JBoss Fuse on OpenShift
Using Red Hat JBoss Fuse on OpenShiftKenneth Peeples
 
20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data ai20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data aiMeng-Ru (Raymond) Tsai
 

Similar to Apache MyFaces 1.2 Web Application Development (20)

Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuse
 
ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax Framework
 
How can Liferay Developers, Deployers move to the Cloud
How can Liferay Developers, Deployers move to the CloudHow can Liferay Developers, Deployers move to the Cloud
How can Liferay Developers, Deployers move to the Cloud
 
Jetty Vs Tomcat
Jetty Vs TomcatJetty Vs Tomcat
Jetty Vs Tomcat
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC Seminar
 
vSphere with Tanzu Tech Overview 7.0 U1 (1).pptx
vSphere with Tanzu Tech Overview 7.0 U1 (1).pptxvSphere with Tanzu Tech Overview 7.0 U1 (1).pptx
vSphere with Tanzu Tech Overview 7.0 U1 (1).pptx
 
Vue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrareVue3: nuove funzionalità, differenze e come migrare
Vue3: nuove funzionalità, differenze e come migrare
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 
WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6WebLogic Developer Experience and Java EE 6
WebLogic Developer Experience and Java EE 6
 
Flex and Java
Flex and JavaFlex and Java
Flex and Java
 
Maven 3: New Features - OPITZ CONSULTING - Stefan Scheidt
Maven 3: New Features - OPITZ CONSULTING - Stefan ScheidtMaven 3: New Features - OPITZ CONSULTING - Stefan Scheidt
Maven 3: New Features - OPITZ CONSULTING - Stefan Scheidt
 
Docker Orchestrators
Docker OrchestratorsDocker Orchestrators
Docker Orchestrators
 
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
Deploying Kafka on vSphere with Kubernetes Using the Confluent Operator (Just...
Deploying Kafka on vSphere with Kubernetes Using the Confluent Operator (Just...Deploying Kafka on vSphere with Kubernetes Using the Confluent Operator (Just...
Deploying Kafka on vSphere with Kubernetes Using the Confluent Operator (Just...
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
Using Red Hat JBoss Fuse on OpenShift
Using Red Hat JBoss Fuse on OpenShiftUsing Red Hat JBoss Fuse on OpenShift
Using Red Hat JBoss Fuse on OpenShift
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
Nemo intro-100811
Nemo intro-100811Nemo intro-100811
Nemo intro-100811
 
20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data ai20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data ai
 

Recently uploaded

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Recently uploaded (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

Apache MyFaces 1.2 Web Application Development

  • 1. Apache MyFaces 1.2 Web Application Development AUTHOR : BART KUMMEL E-MAIL : BART@BARTKUMMEL.NET DATE : MARCH 2010 WWW.TRANSFER-SOLUTIONS.COM
  • 2. Apache MyFaces 1.2 Web Application Development Building Java EE web applications using: JSF 1.2 Facelets Apache MyFaces and sub projects Focus on reuse and maintainability © COPYRIGHT TRANSFER SOLUTIONS B.V. 2
  • 3. Table of Contents 1. Introduction 8. Integrating with the 2. Getting started Backend 3. Facelets 9. Orchestra 4. Tomahawk 10. Extensions Validator 5. Trinidad – the 11. Best Practices Basics 6. Advanced Trinidad 7. Trinidad Skinning and Tuning © COPYRIGHT TRANSFER SOLUTIONS B.V. 3
  • 4. 1. Introduction Introduces the Apache MyFaces project and all of its sub projects: Core Tomahawk Sandbox Trinidad Orchestra Extensions Validator © COPYRIGHT TRANSFER SOLUTIONS B.V. 4
  • 5. 2. Getting Started Setting up the development environment Detailed instructions for Eclipse and JDeveloper, as well as introduction to the MyFaces Maven archetypes Setting up the application server Explaining the common steps that are the same for all Java EE application servers Introduction of the example case Throughout the book an example scenario is used to work towards a fully functional application when the book is finished. © COPYRIGHT TRANSFER SOLUTIONS B.V. 5
  • 6. 3. Facelets The book starts out with an introduction to Facelets Facelets is also used in all examples in the rest or the book Throughout the book we focus on getting the most out of the combination of Facelets with the MyFaces products This makes the book also an excellent resource to get started with Facelets © COPYRIGHT TRANSFER SOLUTIONS B.V. 6
  • 7. 3. Facelets – ToC Why Facelets? This chapter starts by discussing why we should use Facelets instead of JSP in all our projects. Templating with Facelets The creation and use of page templates with Facelets is dicussed Creating and using composition components Composition components: create your own JSF components by combining existing components Other Facelets topics that are discussed in this chapter: Using static functions Using inline texts © COPYRIGHT TRANSFER SOLUTIONS B.V. 7
  • 8. 4. Tomahawk – ToC Extended components Creating basic data tables Using advanced data table features Uploading files Working with dates and calendars Extra validators © COPYRIGHT TRANSFER SOLUTIONS B.V. 8
  • 9. 5. Trinidad – the Basics – ToC Creating data tables Including AJAX-based pagination Creating input and edit forms File uploading Using Trinidad’s hierarchical navigation features Trinidad has a comprehensive navigation framework that is covered in this section Creating layouts for our pages Using the many Trinidad layout components © COPYRIGHT TRANSFER SOLUTIONS B.V. 9
  • 10. 6. Advanced Trinidad – ToC (1/2) Data visualization Creating nice, SVG-based charts Passing on data with page flows Introducing the page flow scope Using AJAX and Partial Page Rendering Trinidad has AJAX embedded in every component © COPYRIGHT TRANSFER SOLUTIONS B.V. 10
  • 11. 6. Advanced Trinidad – ToC (2/2) Creating dialogs Trinidads powerful dialog framework allows us to create dialogs easily We can easily return values from a dialog Client-side validation and conversion For the optimal AJAX experience © COPYRIGHT TRANSFER SOLUTIONS B.V. 11
  • 12. 7. Trinidad Skinning and Tuning – ToC Skinning Tuning Understanding the Accessibility terminology Performance Setting up skinning Debugging Creating a Trinidad Appearance skin Localization Extending skins © COPYRIGHT TRANSFER SOLUTIONS B.V. 12
  • 13. 8. Integrating with the Backend This chapter shows how we can integrate our View layer with a backend. Only Java EE standard components are used This chapter is just an introduction so we have a good basis for chapters 9 and 10 © COPYRIGHT TRANSFER SOLUTIONS B.V. 13
  • 14. 8. Integrating with the Backend – ToC The Model-View-Controller architecture A short recap of the MVC theory Setting up the Java EE application structure How to apply MVC on a Java EE application Preparing a database environment Implementing the Model Using the service facade in the View layer Limitations and problems The presented aproach has some limitations and problems. MyFaces can fix this! © COPYRIGHT TRANSFER SOLUTIONS B.V. 14
  • 15. 9. MyFaces Orchestra Managing persistence (database) transactions is often a difficult task, especially when transactions have to stay open over multiple UI page requests This chapter shows how we can let Orchestra manage the transactions Orchestra can guarantee that we have a single transaction during a conversation © COPYRIGHT TRANSFER SOLUTIONS B.V. 15
  • 16. 9. MyFaces Orchestra – ToC Setting up Orchestra Using the Orchestra ViewController Setting up Orchestra conversations Generating forms with DynaForm © COPYRIGHT TRANSFER SOLUTIONS B.V. 16
  • 17. 10: Extensions Validator This is the first book to cover MyFaces ExtVal Based on the lastest ExtVal release, that was released a few days after the book was published ExtVal gives us the chance to use JSR 303 Bean Validation without the need for JSF 2.0 © COPYRIGHT TRANSFER SOLUTIONS B.V. 17
  • 18. 10: Extensions Validator – ToC (1/2) Basic usage – JPA annotations ExtVal can create JSF validators based on JPA annotations in our Model Complementing JPA annotations ExtVal has extra annotations if we cannot express our validation rule in JPA annotations Applying cross validation If validation of one field depends on a value in another field © COPYRIGHT TRANSFER SOLUTIONS B.V. 18
  • 19. 10: Extensions Validator – ToC (2/2) Creating custom error messages Creating our own validation strategy This use case is used to show the flexibility and extendability of ExtVal Extending ExtVal with add-ons Using Bean Validation Instead of JPA or ExtVal annotations, we can also use Bean Validation (JSR 303) annotations © COPYRIGHT TRANSFER SOLUTIONS B.V. 19
  • 20. 10: Extensions Validator On the website of Packt Publishing, a series of articles on ExtVal is published: Apache MyFaces Extensions Validator Customizing and Extending Apache MyFaces ExtVal Using Bean Validation (JSR 303) annotations with Apache MyFaces 1.2 © COPYRIGHT TRANSFER SOLUTIONS B.V. 20
  • 21. 11: Best Practices – ToC Preventing direct access to page definitions Using container-managed security with JSF Using component bindings wisely Keeping the state of a component © COPYRIGHT TRANSFER SOLUTIONS B.V. 21
  • 22. Apache MyFaces 1.2 Web Application Development author: Bart Kummel isbn: 978-1-847193-25-4 publisher: Packt Publishing 408 pages, paperback or e-book © COPYRIGHT TRANSFER SOLUTIONS B.V. 22
  • 23. Apache MyFaces 1.2 Web Application Development order via: http://tinyurl.com/am12wad author’s website: http://www.bartkummel.net © COPYRIGHT TRANSFER SOLUTIONS B.V. 23