SlideShare a Scribd company logo
JSF 2.0
                              Robert Reiz
Tuesday, February 23, 2010
Trainer


                  Robert Reiz Dipl. Inf. (FH-Mannheim)

                  Buch Mail-Travel-Agents auf Linux-Systemen

                  Java-Projekte seit 2002

                  JSF-Erfahrung seit 2006

                  Gründung der PLOIN GmbH Jan. 2008

                  Trainer bei der GFU seit Dez. 2008




Tuesday, February 23, 2010
Trainer


                  Comitter

                       ploinFaces

                       ploinMailFactory

                  Blog

                     http://www.robert-reiz.de




Tuesday, February 23, 2010
Eine Presentation ist keine Dokumentation!
       Eine Presentation soll lediglich den Speaker bei seinem
                       Vortrag unterstützen!




Tuesday, February 23, 2010
Wer kennt JSF ?




Tuesday, February 23, 2010
Was ist JSF ?




Tuesday, February 23, 2010
Standards




                             JSF 1.0 - JSR 127 - May 2004
                             JSF 1.2 - JSR 252 - May 2006
                             JSF 2.0 - JSR 314 - Julie 2009




Tuesday, February 23, 2010
Lifecycle



            Request
                                            Apply Request     Process
                             Restore View
                                               Values        Validations




             Response
                               Render          Invoke       Update Modell
                              Response       Applications      Values




Tuesday, February 23, 2010
JSF 1.2
                             xmlns:h="http://java.sun.com/jsf/html"
                             xmlns:f="http://java.sun.com/jsf/core"




                             JSF 2.0
                             xmlns:ui="http://java.sun.com/jsf/facelets"
                             xmlns:composite="http://java.sun.com/jsf/composite"

                             jsf.js




Tuesday, February 23, 2010
<h:selectOneListbox id="edit_workUnit_selectedProject"
                                        value="${managedBean[projectItem]}"
                                        style="width:200px; height:200px;"
                                        required="true">
                  	 <f:selectItems value="#{managedBean.projectList}"/>
                  </h:selectOneListbox>

                  <h:commandButton value="Speichern"
                                   actionListener="#{managedBean.doLoginListener}"
                                   action="#{loginBean.doLogin}" />




Tuesday, February 23, 2010
Tuesday, February 23, 2010
Implementierungen


                    JSF-RI
                  (mojarra)
                             MyFaces-Core


Tuesday, February 23, 2010
Flora und Fauna



         RichFaces                                    IceFaces
                     ADF               Netadvantage         Facelets
                                                        Tomahawk
                                     Trinidad
                         Orchestra                     PrimeFaces

                                        Tobago
                         Woodstock                          ploinFaces


Tuesday, February 23, 2010
Matrix




               http://www.jsfmatrix.net/



Tuesday, February 23, 2010
Nachteile von JSF 1.X



Tuesday, February 23, 2010
JSF 1.X


                   Nicht Bookmarkfähig -> PostBackPattern
                   Lange XML-Konfiguration
                   Kein Templating mit JSP
                   Kein Resourcen-Handing
                   Kein AJAX
                   Wenig Convention -> Viel Configuration



Tuesday, February 23, 2010
JSF 2.0




Tuesday, February 23, 2010
JSF 2.0 - Big changes


                             XML-Freie Konfig. mit Annotationen
                             Facelets ist der neue Standard
                               Facelets-Comp. mit Interfaces/Impl.
                             Standartisiertes AJAX
                             Bookable links/buttons




Tuesday, February 23, 2010
JSF 2.0 - Small changes


                             Neue Scopes
                             System-events
                             Direkte Navigation
                             ProjectStage
                             Neue Methoden in der FacesContext
                             ....




Tuesday, February 23, 2010
Status Quo JSF 2.0

                   JSF-RI            ploinFaces

                 (mojarra)
                                         MyFaces-Core

                         RichFaces
                                                  IceFaces

                              PrimeFaces

Tuesday, February 23, 2010
Annotations



Tuesday, February 23, 2010
@ManagedBean
                       @RequestScoped
                       public class LogInBean {

                       	     private static final long serialVersionUID = 199L;
                       	     private String loginName = "admin";
                       	     @ManagedProperty(name = "pass", value="admin")
                       	     private String password;

                             private String doNavigate(){
                               return "/page/welcome";
                             }

                       }




Tuesday, February 23, 2010
Facelets



Tuesday, February 23, 2010
Facelets



                             Nicht 1:1 übernommen
                             Templating
                             15% schneller als JSP
                             Einfache Komponentenentwicklung
                             Schnittstelle für composite-components




Tuesday, February 23, 2010
Facelets - Template

                              layout.xhtml




              login.xhtml    welcome.xhtml   myData.xhtml

Tuesday, February 23, 2010
Facelets - Template
                 <html xmlns="http://www.w3.org/1999/xhtml"
                 	   xmlns:h="http://java.sun.com/jsf/html"
                 	   xmlns:f="http://java.sun.com/jsf/core"
                 	   xmlns:ui="http://java.sun.com/jsf/facelets">
                 <h:head>
                 	   <link rel="stylesheet" type="text/css" href="../css/layout.css" />
                 </h:head>
                 <h:body>
                 	
                 	   <div id="header" align="center">
                 	   	   <ui:insert name="header">
                 	   	   	   HEADER - ${title}
                 	   	   </ui:insert>
                 	   </div>

                 	     <div id="content">
                 	     	   <ui:insert name="content">
                 	     	   	   Content
                 	     	   </ui:insert>
                 	     </div>

                 	     <div id="footer" align="center">
                 	     	   <ui:insert name="footer" >
                 	     	   	   FOOTER
                 	     	   </ui:insert>
                 	     </div>

                 </h:body>
                 </html>




Tuesday, February 23, 2010
Facelets - Template



                  <ui:composition template="/page/layout.xhtml">
                  	 <ui:param name="title" value="LOGIN SITE" />
                  	 <ui:define name="content">
                  	 	   ... Hier Inhalt
                  	 </ui:define>	
                  </ui:composition>




Tuesday, February 23, 2010
Facelets - Compon.


                             <html xmlns="http://www.w3.org/1999/xhtml"
                               xmlns:composite="http://java.sun.com/jsf/composite">
                             <head><title>MyComponent</title></head>
                             <body>

                             	   <composite:interface>
                             	     <composite:attribute name="title"/>
                             	   </composite:interface>
                             	
                             	   <composite:implementation>
                             	     <div style="border: 1px soldi red">
                             	       <h1>#{cc.attrs.title}</h1>
                                     ... XHTML oder JSF-Komponenten
                             	     </div>
                             	   </composite:implementation>

                             </body>
                             </html>




Tuesday, February 23, 2010
Facelets - Compon.



                    <html xmlns:gfu="http://java.sun.com/jsf/composite/gfu">




                   <gfu:myComponent title="Panel-Header" />




Tuesday, February 23, 2010
Clean Code




Tuesday, February 23, 2010
AJAX



Tuesday, February 23, 2010
AJAX



            <f:ajax event="keyup"
                    execute="@form"
                    render="form:result" />




Tuesday, February 23, 2010
AJAX




          <h:form id="form">
          	 <h:inputText value="#{welcomeBean.text}" >
          	 	 <f:ajax event="keyup" execute="@form" render="form:result" />
          	 </h:inputText>
          	 <h:outputText id="result" value="#{welcomeBean.text}" />
          </h:form>




Tuesday, February 23, 2010
AJAX


                             jsf.ajax.addOnError(callback)

                             jsf.ajax.addOnEvent(callback)

                             jsf.ajax.request(source, event, options)

                             jsf.ajax.response(request, context)




Tuesday, February 23, 2010
Resources



Tuesday, February 23, 2010
Resources



             <h:outputStylesheet name="css/style.css" />
             	
             <h:outputScript name="jsf.js" libary="javax.faces" target="head" />
             	
             <h:graphicImage value="#{resource['lib:gfu.gif']}" />




Tuesday, February 23, 2010
/resources/compLib/1.1/script/compScript.js

                /META-INF/resources/compLib/script/compScript.js




                [localePrefix/][libraryName/][libraryVersion/]resourceName[/resourceVersion]




Tuesday, February 23, 2010
Bookable Pages



Tuesday, February 23, 2010
Bookable



                <h:link outcome="/page/welcome" value="testLink" includeViewParams="true" >
                	 <f:param name="userId" value="5" />
                </h:link>




                       <a href="/demoJsf2/page/welcome.jsf?userId=5">testLink</a>




Tuesday, February 23, 2010
Bookable



                <h:button outcome="/page/welcome" value="testLink" includeViewParams="true" >
                	 <f:param name="userId" value="5" />
                </h:button>




               <input type="button" 
                      value="testLink" 
                      onclick="window.location.href='/demoJsf2/page/welcome.jsf?userId=5'; return false;"/>




Tuesday, February 23, 2010
Scopes



Tuesday, February 23, 2010
Scopes


                             Application
                             Session
                             Request
                             View
                             Flash
                             Custom
                             None



Tuesday, February 23, 2010
Flows/Conversation



Tuesday, February 23, 2010
Flows - ploinFaces


                             <flow id="loginFlow">
                               <views>
                                 <view>/login.xhtml</view>
                                 <view>/page/help/agbLogin.xhtml</view>
                                 <view>/page/help/haftungLogin.xhtml</view>
                               </views>
                               <attributes>
                                 <attribute>logInOutBean</attribute>
                               </attributes>
                             </flow>




Tuesday, February 23, 2010
Flows - ploinFaces



                             <flow id="useradministrationFlow">
                               <views>
                                 <view>/page/useradmin.*</view>
                               </views>
                               <attributes>
                                 <attribute>useradminBean</attribute>
                                 <attribute>secureBean</attribute>
                               </attributes>
                             </flow>




Tuesday, February 23, 2010
Flows - ploinFaces

           <authoritySource>#{sessionBean.loginUserRole}</authoritySource>

           <accessDeniedPage>/page/accessDenied.xhtml</accessDeniedPage>

           <flow id="useradministrationFlow">
             <views>
               <view>/page/useradmin.*</view>
             </views>
             <attributes>
               <attribute>useradminBean</attribute>
               <attribute>secureBean</attribute>
             </attributes>
             <includeAuthorities>
               <authority>Administrator</authority>
               <authority>GIS</authority>
             </includeAuthorities>
           </flow>



Tuesday, February 23, 2010
Clean Code




Tuesday, February 23, 2010
DEMO



Tuesday, February 23, 2010
???


Tuesday, February 23, 2010

More Related Content

Similar to Java Server Faces 2.0 - Der Standard für moderne und komponentenbasierte Webanwendungen

Node.js and websockets intro
Node.js and websockets introNode.js and websockets intro
Node.js and websockets intro
kompozer
 
Upgrading to Rails 3
Upgrading to Rails 3Upgrading to Rails 3
Upgrading to Rails 3
Michael Bleigh
 
Základy GWT
Základy GWTZáklady GWT
Základy GWT
Tomáš Holas
 
Browser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google ChromeBrowser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google Chrome
Kenneth Auchenberg
 
Campus Party 2010
Campus Party 2010Campus Party 2010
Campus Party 2010
Fabio Akita
 
Web UI performance tuning
Web UI performance tuningWeb UI performance tuning
Web UI performance tuning
Andy Pemberton
 
Jquery Introduction
Jquery IntroductionJquery Introduction
Jquery Introduction
cabbiepete
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices
ThoughtWorks
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10
Erik Sowa
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
Adrian Olaru
 
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPIPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
Guilherme Blanco
 
The Tech Side of Project Argo
The Tech Side of Project ArgoThe Tech Side of Project Argo
The Tech Side of Project Argo
Wesley Lindamood
 
Advanced Data Widgets and Server Integration
Advanced Data Widgets and Server IntegrationAdvanced Data Widgets and Server Integration
Advanced Data Widgets and Server Integration
Sencha
 
HTML 5: The Future of the Web
HTML 5: The Future of the WebHTML 5: The Future of the Web
HTML 5: The Future of the Web
Tim Wright
 
Advanced Performance Tuning in Ext GWT
Advanced Performance Tuning in Ext GWTAdvanced Performance Tuning in Ext GWT
Advanced Performance Tuning in Ext GWT
Sencha
 
What makes JBoss AS7 tick?
What makes JBoss AS7 tick?What makes JBoss AS7 tick?
What makes JBoss AS7 tick?
marius_bogoevici
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UI
Rebecca Murphey
 
OpenSocial Done Right
OpenSocial Done RightOpenSocial Done Right
OpenSocial Done Right
Bastian Hofmann
 
University of Abertay Dundee - evening
University of Abertay Dundee - eveningUniversity of Abertay Dundee - evening
University of Abertay Dundee - evening
Rachel Andrew
 
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Alexandre Morgaut
 

Similar to Java Server Faces 2.0 - Der Standard für moderne und komponentenbasierte Webanwendungen (20)

Node.js and websockets intro
Node.js and websockets introNode.js and websockets intro
Node.js and websockets intro
 
Upgrading to Rails 3
Upgrading to Rails 3Upgrading to Rails 3
Upgrading to Rails 3
 
Základy GWT
Základy GWTZáklady GWT
Základy GWT
 
Browser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google ChromeBrowser Extensions in Mozilla Firefox & Google Chrome
Browser Extensions in Mozilla Firefox & Google Chrome
 
Campus Party 2010
Campus Party 2010Campus Party 2010
Campus Party 2010
 
Web UI performance tuning
Web UI performance tuningWeb UI performance tuning
Web UI performance tuning
 
Jquery Introduction
Jquery IntroductionJquery Introduction
Jquery Introduction
 
Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices Nick Sieger-Exploring Rails 3 Through Choices
Nick Sieger-Exploring Rails 3 Through Choices
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHPIPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
IPC2010SE Doctrine2 Enterprise Persistence Layer for PHP
 
The Tech Side of Project Argo
The Tech Side of Project ArgoThe Tech Side of Project Argo
The Tech Side of Project Argo
 
Advanced Data Widgets and Server Integration
Advanced Data Widgets and Server IntegrationAdvanced Data Widgets and Server Integration
Advanced Data Widgets and Server Integration
 
HTML 5: The Future of the Web
HTML 5: The Future of the WebHTML 5: The Future of the Web
HTML 5: The Future of the Web
 
Advanced Performance Tuning in Ext GWT
Advanced Performance Tuning in Ext GWTAdvanced Performance Tuning in Ext GWT
Advanced Performance Tuning in Ext GWT
 
What makes JBoss AS7 tick?
What makes JBoss AS7 tick?What makes JBoss AS7 tick?
What makes JBoss AS7 tick?
 
Delivering a Responsive UI
Delivering a Responsive UIDelivering a Responsive UI
Delivering a Responsive UI
 
OpenSocial Done Right
OpenSocial Done RightOpenSocial Done Right
OpenSocial Done Right
 
University of Abertay Dundee - evening
University of Abertay Dundee - eveningUniversity of Abertay Dundee - evening
University of Abertay Dundee - evening
 
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
Wakanda: a new end-to-end JavaScript platform - JSConf Berlin 2009
 

More from GFU Cyrus AG

Social Media im Unternehmen
Social Media im UnternehmenSocial Media im Unternehmen
Social Media im Unternehmen
GFU Cyrus AG
 
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
GFU Cyrus AG
 
Clean Code Developer
Clean Code DeveloperClean Code Developer
Clean Code Developer
GFU Cyrus AG
 
Cross-Apps-Entwicklung für iPhone, Android und Co.
Cross-Apps-Entwicklung für iPhone, Android und Co.Cross-Apps-Entwicklung für iPhone, Android und Co.
Cross-Apps-Entwicklung für iPhone, Android und Co.
GFU Cyrus AG
 
Softwarequalitätssicherung mit Continuous Integration Tools
Softwarequalitätssicherung mit Continuous Integration ToolsSoftwarequalitätssicherung mit Continuous Integration Tools
Softwarequalitätssicherung mit Continuous Integration Tools
GFU Cyrus AG
 
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
GFU Cyrus AG
 
Requirements Engineering in agilen Projekten - Flexibilität ist gefordert
Requirements Engineering in agilen Projekten - Flexibilität ist gefordertRequirements Engineering in agilen Projekten - Flexibilität ist gefordert
Requirements Engineering in agilen Projekten - Flexibilität ist gefordert
GFU Cyrus AG
 
SharePoint 2010 - Was ist neu, was wird besser!
SharePoint 2010 - Was ist neu, was wird besser!SharePoint 2010 - Was ist neu, was wird besser!
SharePoint 2010 - Was ist neu, was wird besser!
GFU Cyrus AG
 
Java Persistence 2.0
Java Persistence 2.0Java Persistence 2.0
Java Persistence 2.0GFU Cyrus AG
 
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
GFU Cyrus AG
 
Liferay Portal - ein Webportal für viele Unternehmensanforderungen
Liferay Portal - ein Webportal für viele UnternehmensanforderungenLiferay Portal - ein Webportal für viele Unternehmensanforderungen
Liferay Portal - ein Webportal für viele Unternehmensanforderungen
GFU Cyrus AG
 
PostgreSQL im Produktivbetrieb
PostgreSQL im ProduktivbetriebPostgreSQL im Produktivbetrieb
PostgreSQL im Produktivbetrieb
GFU Cyrus AG
 
Wieviel Web2.0 braucht Ihr Unternehmen?
Wieviel Web2.0 braucht Ihr Unternehmen?Wieviel Web2.0 braucht Ihr Unternehmen?
Wieviel Web2.0 braucht Ihr Unternehmen?
GFU Cyrus AG
 
Neue Features der Java EE 6
Neue Features der Java EE 6Neue Features der Java EE 6
Neue Features der Java EE 6
GFU Cyrus AG
 
Das Java-Spring-Framework in der Praxis
Das Java-Spring-Framework in der PraxisDas Java-Spring-Framework in der Praxis
Das Java-Spring-Framework in der Praxis
GFU Cyrus AG
 
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer SeminarverwaltungAgile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
GFU Cyrus AG
 
Wissensmanagement bei Volkswagen
Wissensmanagement bei VolkswagenWissensmanagement bei Volkswagen
Wissensmanagement bei Volkswagen
GFU Cyrus AG
 
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
GFU Cyrus AG
 
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalkGrenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
GFU Cyrus AG
 
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
GFU Cyrus AG
 

More from GFU Cyrus AG (20)

Social Media im Unternehmen
Social Media im UnternehmenSocial Media im Unternehmen
Social Media im Unternehmen
 
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
Java Code Quality: Gute Software braucht guten Code - Regeln für verständlich...
 
Clean Code Developer
Clean Code DeveloperClean Code Developer
Clean Code Developer
 
Cross-Apps-Entwicklung für iPhone, Android und Co.
Cross-Apps-Entwicklung für iPhone, Android und Co.Cross-Apps-Entwicklung für iPhone, Android und Co.
Cross-Apps-Entwicklung für iPhone, Android und Co.
 
Softwarequalitätssicherung mit Continuous Integration Tools
Softwarequalitätssicherung mit Continuous Integration ToolsSoftwarequalitätssicherung mit Continuous Integration Tools
Softwarequalitätssicherung mit Continuous Integration Tools
 
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
Datenschutz bei Facebook & Co. - Wie schütze ich meine persönlichen Daten im ...
 
Requirements Engineering in agilen Projekten - Flexibilität ist gefordert
Requirements Engineering in agilen Projekten - Flexibilität ist gefordertRequirements Engineering in agilen Projekten - Flexibilität ist gefordert
Requirements Engineering in agilen Projekten - Flexibilität ist gefordert
 
SharePoint 2010 - Was ist neu, was wird besser!
SharePoint 2010 - Was ist neu, was wird besser!SharePoint 2010 - Was ist neu, was wird besser!
SharePoint 2010 - Was ist neu, was wird besser!
 
Java Persistence 2.0
Java Persistence 2.0Java Persistence 2.0
Java Persistence 2.0
 
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
Pragmatische Einführung von IT-Servicemanagement - ITIL im Unternehmen - Erfa...
 
Liferay Portal - ein Webportal für viele Unternehmensanforderungen
Liferay Portal - ein Webportal für viele UnternehmensanforderungenLiferay Portal - ein Webportal für viele Unternehmensanforderungen
Liferay Portal - ein Webportal für viele Unternehmensanforderungen
 
PostgreSQL im Produktivbetrieb
PostgreSQL im ProduktivbetriebPostgreSQL im Produktivbetrieb
PostgreSQL im Produktivbetrieb
 
Wieviel Web2.0 braucht Ihr Unternehmen?
Wieviel Web2.0 braucht Ihr Unternehmen?Wieviel Web2.0 braucht Ihr Unternehmen?
Wieviel Web2.0 braucht Ihr Unternehmen?
 
Neue Features der Java EE 6
Neue Features der Java EE 6Neue Features der Java EE 6
Neue Features der Java EE 6
 
Das Java-Spring-Framework in der Praxis
Das Java-Spring-Framework in der PraxisDas Java-Spring-Framework in der Praxis
Das Java-Spring-Framework in der Praxis
 
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer SeminarverwaltungAgile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
Agile Geschäftsprozeßanalyse OOA/D am Beispiel einer Seminarverwaltung
 
Wissensmanagement bei Volkswagen
Wissensmanagement bei VolkswagenWissensmanagement bei Volkswagen
Wissensmanagement bei Volkswagen
 
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
 
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalkGrenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
Grenzüberschreitende Geschäftsprozesse mit Microsoft SharePoint und BizTalk
 
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
Projekt! - Toll - Ein Anderer Macht`s! - Voraussetzungen für eine erfolgreich...
 

Recently uploaded

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
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
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
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
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
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
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
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
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
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
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
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
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 

Recently uploaded (20)

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
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
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
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
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
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
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
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...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
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
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
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
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 

Java Server Faces 2.0 - Der Standard für moderne und komponentenbasierte Webanwendungen

  • 1. JSF 2.0 Robert Reiz Tuesday, February 23, 2010
  • 2. Trainer Robert Reiz Dipl. Inf. (FH-Mannheim) Buch Mail-Travel-Agents auf Linux-Systemen Java-Projekte seit 2002 JSF-Erfahrung seit 2006 Gründung der PLOIN GmbH Jan. 2008 Trainer bei der GFU seit Dez. 2008 Tuesday, February 23, 2010
  • 3. Trainer Comitter ploinFaces ploinMailFactory Blog http://www.robert-reiz.de Tuesday, February 23, 2010
  • 4. Eine Presentation ist keine Dokumentation! Eine Presentation soll lediglich den Speaker bei seinem Vortrag unterstützen! Tuesday, February 23, 2010
  • 5. Wer kennt JSF ? Tuesday, February 23, 2010
  • 6. Was ist JSF ? Tuesday, February 23, 2010
  • 7. Standards JSF 1.0 - JSR 127 - May 2004 JSF 1.2 - JSR 252 - May 2006 JSF 2.0 - JSR 314 - Julie 2009 Tuesday, February 23, 2010
  • 8. Lifecycle Request Apply Request Process Restore View Values Validations Response Render Invoke Update Modell Response Applications Values Tuesday, February 23, 2010
  • 9. JSF 1.2 xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" JSF 2.0 xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:composite="http://java.sun.com/jsf/composite" jsf.js Tuesday, February 23, 2010
  • 10. <h:selectOneListbox id="edit_workUnit_selectedProject" value="${managedBean[projectItem]}" style="width:200px; height:200px;" required="true"> <f:selectItems value="#{managedBean.projectList}"/> </h:selectOneListbox> <h:commandButton value="Speichern" actionListener="#{managedBean.doLoginListener}" action="#{loginBean.doLogin}" /> Tuesday, February 23, 2010
  • 12. Implementierungen JSF-RI (mojarra) MyFaces-Core Tuesday, February 23, 2010
  • 13. Flora und Fauna RichFaces IceFaces ADF Netadvantage Facelets Tomahawk Trinidad Orchestra PrimeFaces Tobago Woodstock ploinFaces Tuesday, February 23, 2010
  • 14. Matrix http://www.jsfmatrix.net/ Tuesday, February 23, 2010
  • 15. Nachteile von JSF 1.X Tuesday, February 23, 2010
  • 16. JSF 1.X Nicht Bookmarkfähig -> PostBackPattern Lange XML-Konfiguration Kein Templating mit JSP Kein Resourcen-Handing Kein AJAX Wenig Convention -> Viel Configuration Tuesday, February 23, 2010
  • 18. JSF 2.0 - Big changes XML-Freie Konfig. mit Annotationen Facelets ist der neue Standard Facelets-Comp. mit Interfaces/Impl. Standartisiertes AJAX Bookable links/buttons Tuesday, February 23, 2010
  • 19. JSF 2.0 - Small changes Neue Scopes System-events Direkte Navigation ProjectStage Neue Methoden in der FacesContext .... Tuesday, February 23, 2010
  • 20. Status Quo JSF 2.0 JSF-RI ploinFaces (mojarra) MyFaces-Core RichFaces IceFaces PrimeFaces Tuesday, February 23, 2010
  • 22. @ManagedBean @RequestScoped public class LogInBean { private static final long serialVersionUID = 199L; private String loginName = "admin"; @ManagedProperty(name = "pass", value="admin") private String password; private String doNavigate(){ return "/page/welcome"; } } Tuesday, February 23, 2010
  • 24. Facelets Nicht 1:1 übernommen Templating 15% schneller als JSP Einfache Komponentenentwicklung Schnittstelle für composite-components Tuesday, February 23, 2010
  • 25. Facelets - Template layout.xhtml login.xhtml welcome.xhtml myData.xhtml Tuesday, February 23, 2010
  • 26. Facelets - Template <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <link rel="stylesheet" type="text/css" href="../css/layout.css" /> </h:head> <h:body> <div id="header" align="center"> <ui:insert name="header"> HEADER - ${title} </ui:insert> </div> <div id="content"> <ui:insert name="content"> Content </ui:insert> </div> <div id="footer" align="center"> <ui:insert name="footer" > FOOTER </ui:insert> </div> </h:body> </html> Tuesday, February 23, 2010
  • 27. Facelets - Template <ui:composition template="/page/layout.xhtml"> <ui:param name="title" value="LOGIN SITE" /> <ui:define name="content"> ... Hier Inhalt </ui:define> </ui:composition> Tuesday, February 23, 2010
  • 28. Facelets - Compon. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite"> <head><title>MyComponent</title></head> <body> <composite:interface> <composite:attribute name="title"/> </composite:interface> <composite:implementation> <div style="border: 1px soldi red"> <h1>#{cc.attrs.title}</h1> ... XHTML oder JSF-Komponenten </div> </composite:implementation> </body> </html> Tuesday, February 23, 2010
  • 29. Facelets - Compon. <html xmlns:gfu="http://java.sun.com/jsf/composite/gfu"> <gfu:myComponent title="Panel-Header" /> Tuesday, February 23, 2010
  • 32. AJAX <f:ajax event="keyup" execute="@form" render="form:result" /> Tuesday, February 23, 2010
  • 33. AJAX <h:form id="form"> <h:inputText value="#{welcomeBean.text}" > <f:ajax event="keyup" execute="@form" render="form:result" /> </h:inputText> <h:outputText id="result" value="#{welcomeBean.text}" /> </h:form> Tuesday, February 23, 2010
  • 34. AJAX jsf.ajax.addOnError(callback) jsf.ajax.addOnEvent(callback) jsf.ajax.request(source, event, options) jsf.ajax.response(request, context) Tuesday, February 23, 2010
  • 36. Resources <h:outputStylesheet name="css/style.css" /> <h:outputScript name="jsf.js" libary="javax.faces" target="head" /> <h:graphicImage value="#{resource['lib:gfu.gif']}" /> Tuesday, February 23, 2010
  • 37. /resources/compLib/1.1/script/compScript.js /META-INF/resources/compLib/script/compScript.js [localePrefix/][libraryName/][libraryVersion/]resourceName[/resourceVersion] Tuesday, February 23, 2010
  • 39. Bookable <h:link outcome="/page/welcome" value="testLink" includeViewParams="true" > <f:param name="userId" value="5" /> </h:link> <a href="/demoJsf2/page/welcome.jsf?userId=5">testLink</a> Tuesday, February 23, 2010
  • 40. Bookable <h:button outcome="/page/welcome" value="testLink" includeViewParams="true" > <f:param name="userId" value="5" /> </h:button> <input type="button"  value="testLink"  onclick="window.location.href='/demoJsf2/page/welcome.jsf?userId=5'; return false;"/> Tuesday, February 23, 2010
  • 42. Scopes Application Session Request View Flash Custom None Tuesday, February 23, 2010
  • 44. Flows - ploinFaces <flow id="loginFlow"> <views> <view>/login.xhtml</view> <view>/page/help/agbLogin.xhtml</view> <view>/page/help/haftungLogin.xhtml</view> </views> <attributes> <attribute>logInOutBean</attribute> </attributes> </flow> Tuesday, February 23, 2010
  • 45. Flows - ploinFaces <flow id="useradministrationFlow"> <views> <view>/page/useradmin.*</view> </views> <attributes> <attribute>useradminBean</attribute> <attribute>secureBean</attribute> </attributes> </flow> Tuesday, February 23, 2010
  • 46. Flows - ploinFaces <authoritySource>#{sessionBean.loginUserRole}</authoritySource> <accessDeniedPage>/page/accessDenied.xhtml</accessDeniedPage> <flow id="useradministrationFlow"> <views> <view>/page/useradmin.*</view> </views> <attributes> <attribute>useradminBean</attribute> <attribute>secureBean</attribute> </attributes> <includeAuthorities> <authority>Administrator</authority> <authority>GIS</authority> </includeAuthorities> </flow> Tuesday, February 23, 2010