SlideShare a Scribd company logo
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 2011
Arun Gupta
 
Advanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQAdvanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQ
dejanb
 
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
Arun 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 Future
IndicThreads
 
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
Arun 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 OSGi
Ilya 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 System
Tim 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 JVM
PaulThwaite
 
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 Supplement
Chuong 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 Cc
Franç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 5
Amit Naik
 
Jboss
JbossJboss
01.egovFrame Training Book I
01.egovFrame Training Book I01.egovFrame Training Book I
01.egovFrame Training Book I
Chuong Nguyen
 
Mike Taulty Wpf Dev Days
Mike Taulty Wpf Dev DaysMike Taulty Wpf Dev Days
Mike Taulty Wpf Dev Days
ukdpe
 
02.egovFrame Development Environment training book
02.egovFrame Development Environment training book02.egovFrame Development Environment training book
02.egovFrame Development Environment training book
Chuong 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 Live
goodfriday
 
The Power of Enterprise Java Frameworks
The Power of Enterprise Java FrameworksThe Power of Enterprise Java Frameworks
The Power of Enterprise Java Frameworks
Clarence 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 ExtVal
Bart 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 DSLs
linxbetter
 
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
Tomer 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 Combinators
Tim Dalton
 
Git glossary
Git glossaryGit glossary
Git glossary
Aleksandr Zhuikov
 
Client+server side bean validation
Client+server side bean validationClient+server side bean validation
Client+server side bean validation
Aleksandr 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 AppFuse
Matt 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 Framework
ICEsoftTech
 
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
CloudBees
 
Jetty Vs Tomcat
Jetty Vs TomcatJetty Vs Tomcat
Jetty Vs Tomcat
Tomoaki Sawada
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC Seminar
John 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).pptx
hokismen
 
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
Andrea 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 questions
praveen_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 6
Jeffrey West
 
Flex and Java
Flex and JavaFlex and Java
Flex and Java
gueste65db38
 
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
OPITZ CONSULTING Deutschland
 
Docker Orchestrators
Docker OrchestratorsDocker Orchestrators
Docker Orchestrators
Andrew Sullivan
 
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 Overview
sbobde
 
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 OpenShift
Kenneth Peeples
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
Muthuselvam RS
 
Nemo intro-100811
Nemo intro-100811Nemo intro-100811
Nemo intro-100811
Eugene Chung
 
20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data ai20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data ai
Meng-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

Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 

Recently uploaded (20)

Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 

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