SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
JSF 2.0
PREVIEW
Cagatay Civici
About Me
Apache MyFaces PMC Member
Co-author of “The DeïŹnitive Guide to Apache MyFaces and Facelets”
Reference in “Core JSF 2nd Edition”
Recognized speaker in international and local conferences (JSFOne, JSFDays...)
Oracle RCF Member
Krank Framework committer
JSF Chart Creator Author
YUI4JSF Project Lead
FacesTrace Project Lead
FC Barcelona Fan
Working for SpringSource
Agenda
Overview of JSF 1.x
Overview JSF 2.0
What is new?
Future of JSF
JSF 1.x Overview
Component Oriented
JSF 1.0, 1.1 and 1.2
Standard (jsr 127 and 252)
Two implementations
  Apache MyFaces
  Mojarra (RI)
JSF 1.x - The Good
Component oriented
Extendible
Third party components (Trinidad, Tomahawk,
RichFaces, IceFaces ...)
Rapid application development
Vendor and Tool support
JSF 1.x - The Bad
JSP based
Performance
Not very rich
Exception handling
Too much xml
A bit more...
JSF 2.0 Overview
JSR 314
Part of JEE 6
New features, improvements and ïŹxes
InïŹ‚uenced by community and trends
  Other web frameworks, Ajax, JSF extensions,
  Component libs, blogs etc...
Roadmap
JSR process started in July, 2007
Early Draft Review 1 ïŹnished on July 2008
Early Draft Review 2 ïŹnished on Oct 2008
Proposed Final Draft Date, December 2008
Timed with JEE 6
So What’s New?
AJAX
Easy Component Development
Resource Loading
PDL (Page Description Language)
More Scopes
Less conïŹguration
More
Component interoperability
Scripting (Groovy)
Zero deployment time
System Events
Project Stage
Client side validation
More...
Bookmarks
Exception handling
Improved State Management
Extension Prioritization
Resource Handling
What is a resource?
  css, javascript, images ...
A resource has;
  library, version, locale, name
Two new classes
  javax.faces.application.Resource
  javax.faces.application.ResourceHandler
Load from;
  /resources
  /META-INF/resources
Resource Handling
Resource Format
[localePreïŹx/] [libraryName/] [libraryVersion/] resourceName [/resourceVersion]


Examples
            Under /resources or /META-INF/resources
 - tr/mycoolcomponentlib/1.0/logo.png
 - mycoolcomponentlib/1.0/widget.js/1.0.js
 - mycoolcomponentlib/styles.css

Ability to load from classpath
Resources and
      Custom Components
@ResourceDependency(name=”ajaxsuggest.js”, library=”mycoolcomponentlib”)
public class InputSuggest extends UIInput {...}

                                   OR
@ResourceDependencies({
@ResourceDependency(name=”ajaxsuggest.js”, library=”mycoolcomponentlib”)
@ResourceDependency(name=”ajaxsuggest.css”, library=”mycoolcomponentlib”))}
public class InputSuggest extends UIInput {...}

                                   OR
Application app = FacesContext.getCurrentInstance().getApplication();
Resource resource= app.getResourceHandler().createResource(“suggest.js”,”lib”);
writer.write(“<script ...”); //encode using request.getRequestPath();
Resource Location
4 new tags;
h:head
h:body
h:outputScript
h:outputStyleSheet

Example
 ...
 <h:head>
 </h:head>
 <h:body>
     <h:outputScript name=”suggest.js” target=”head” />
 </h:body>
 ...
Resource Handling Demo
Ajax
Standard JSF-Ajax integration
Javascript API for Ajax
namespace : javax.faces (Open Ajax Alliance)
script: ajax.js
Ajax Request
javax.faces.Ajax.ajaxRequest(element,event,options)
<h:commandButton id=”btn” value=”Submit”
                 action=”#{itemController.newItem}”
onclick=”javax.faces.Ajax.ajaxRequest(this,event,
{execute:this.id, render:’comp1’})”>
</h:commandButton>

Include ajax.js
<h:outputScript name=”ajax.js” library=”javax.faces”
target=”head” />
                      OR
<h:outputAjaxScript target=”head” />
Ajax and Custom
              Components
    Include ajax.js with annotation
@AjaxDependency(target=”head”)
public class MyAjaxComponent extends UIInput {

}

    Or with ResourceHandler

ResourceHandler.createAjaxResource();
Ajax Demo
ConïŹguration
  Annotations instead of xml
<managed-bean>
   <managed-bean-name>createBookController</managed-bean-name>
   <managed-bean-class>
      com.bla.bla.view.MyPojo
   </managed-bean-class>
   <managed-bean-scope>request</managed-bean-scope>
</managed-bean>

                         becomes
 @ManagedBean(name=”myPojo”)
 @RequestScoped
 public class MyPojo {
   ...
 }
ConïŹguration
More annotations
 @FacesComponent
 @FacesConverter
 @ManagedBean
 @ManagedBeans
 @ManagedProperty
 @FacesRenderer
 @FacesRenderKit
 @FacesValidator

More soon...
Project Stage
Project environment setting
Similar to RAILS_ENV
Values;
  Development
  UnitTest
  SystemTest
  Production (Default)
Project Stage
web.xml
  <context-param>
      <param-name>javax.faces.PROJECT_STAGE</param-name>
      <param-value>Development</param-value>
  </context-param>

JNDI
            java:comp/env/jsf/ProjectStage


How to get it?
            Application.getProjectStage()
Project Stage Demo
System Events
Subscription based, no queueing
A bit similar to PhaseEvent idea
Ingridients
  System Events
  System Event Listeners
  Subscribers (Application or UIComponent)
System Events
Application level system events

public abstract void subscribeToEvent(Class<? extends SystemEvent>
systemEventClass, SystemEventListener listener);

public abstract void subscribeToEvent(Class<? extends SystemEvent>
systemEventClass, Class sourceClass, SystemEventListener listener);

public abstract void publishEvent(Class<? extends SystemEvent>
systemEventClass, SystemEventListenerHolder source);

public void publishEvent(Class<? extends SystemEvent>
systemEventClass, Class<?> sourceBaseType, Object source);
System Events
 UIComponent level system events

public void subscribeToEvent(Class<? extends SystemEvent>
eventClass, ComponentSystemEventListener componentListener);

public void unsubscribeFromEvent(Class<? extends SystemEvent>
eventClass, ComponentSystemEventListener componentListener);



 AfterAddToParentEvent
 BeforeRenderEvent       ComponentSystemEvent
 ViewMapCreatedEvent
 ViewMapDestroyedEvent
System Events
 Listen with annotations

@ListenerFor(systemEventClass=AfterAddToParentEvent.class)
public class MyComponent extends UIOutput {}




@ListenersFor({
@ListenerFor(systemEventClass=AfterAddToParentEvent.class,
@ListenerFor(systemEventClass=BeforeRenderEvent.class)})
public class MyComponent extends UIOutput {}
Scopes
ViewScope
  For managed beans
Component scope
  Composition
Conversation scope
  Not in yet, through webbeans?
Scopes - ViewScope
A new managed bean scope
Lives until view is changed

    @ManagedBean(name=”myBean”)
    @ViewScoped
    public class MyBeanInViewScope {
    ...
    }
Scopes Demo
PDL
Page Declaration Language
Based on Facelets
   <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:f="http://java.sun.com/jsf/core">
   <h:head>
       <title>JSF2Demo</title>
   </h:head>
   <h:body>
      <h:form>
          <h:outputText value="Hello" />
      </h:form>
   </h:body>
   </html>
EZComp
Greatly simpliïŹes custom component development
Convention over conïŹguration
Declarative composite components
Components without Java coding
Component scope in composition
EZComp
 Page that uses a composition component

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:jwug="http://java.sun.com/jsf/composite/jwug">
<h:head>
    <title>EZComp Demo</title>
</h:head>
<h:body>
   <h:form>
       <jwug:greeting value=”Mr. Soprano” />
   </h:form>
</h:body>
</html>
EZComp
Under %webroot%/resources/jwug/greeting.xhtml

<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"
   xmlns:composite="http://java.sun.com/jsf/composite">
<body>
<composite:interface>
   <composite:attribute name="value" required="true" />
</composite:interface>
<composite:implementation>
   <h:outputText value=”Hello #{compositeComponent.attrs.value}” />
</composite:implementation>
</body>
</html>
EZComp - Slider
 Scriptaculous based slider

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:jwug="http://java.sun.com/jsf/composite/jwug">
<h:head>
    <title>EZComp Demo</title>
</h:head>
<h:body>
   <h:form>
       <jwug:slider value=”#{demo.number}” min=”0” max=”100”/>
   </h:form>
</h:body>
</html>
EZComp - Slider
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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"
	    xmlns:composite="http://java.sun.com/jsf/composite">
<body>

<composite:interface>
	    <composite:attribute name="id" required="true" />
	    <composite:attribute name="value" required="true" />
	    <composite:attribute name="min" required="false" />
	    <composite:attribute name="max" required="false" />
</composite:interface>
<composite:implementation>

	    <h:outputScript name="prototype.js" library="script" target="head"/>
     <h:outputScript name="scriptaculous.js" library="script" target="head"/>
	
	    <h:inputText id="sliderField" style="width:100px" value="#{compositeComponent.attrs.value}"></h:inputText>
	    <div id="#{compositeComponent.clientId}_track" style="width:105px;background-color:#aaa;height:5px;">
        <div id="#{compositeComponent.clientId}_handle" style="width:5px;height:10px;background-color:#f00;cursor:move;"></div>
     </div>

	    <script type="text/javascript">
     var slider_#{compositeComponent.attrs.id} = new
     Control.Slider('#{compositeComponent.clientId}_handle','#{compositeComponent.clientId}_track',{range:
     $R(#{compositeComponent.attrs.min},#{compositeComponent.attrs.max})});
	    slider_#{compositeComponent.attrs.id}.options.onSlide = function(value){
          $('#{compositeComponent.clientId}:sliderField').value = (value + '').split(".")[0];
};</script>

</composite:implementation>
</body>
</html>
EZComp Slider Demo
Scripting JSF
Groovy instead of Java
Zero deployment time
  Reload faces-conïŹg
Scripted beans, renderers, validators and etc
From JSF 2.0 Issue Tracker
Optimized state management
Exception Handling
Bookmarks
SelectItems
Skinning
Partial validation
Security
more...
MyFaces 2.0
Being worked on...
JSF 2.0 branch created
Not to be late this time
Future of JSF
More component libraries
JSF in EE (WebBeans, Seam, Spring Faces ...)
More RIA integration (Flex, Ajax ...)
Tool support
More adaptation
Resources
JSF 2.0 EG blog : http://blogs.jsfcentral.com/jsf2group
Ed Burns’s blog: http://weblogs.java.net/blog/edburns/
Ryan Lubke’s blog: http://blogs.sun.com/rlubke/
Jim Driscoll’s blog: http://weblogs.java.net/blog/driscoll/
JSR Page: http://jcp.org/en/jsr/detail?id=314
The End - Cheers!
http://cagataycivici.wordpress.com
cagatay@apache.org
PS3 Network id: FacesContext

Weitere Àhnliche Inhalte

Was ist angesagt?

Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Elena Kolevska
 
Struts N E W
Struts N E WStruts N E W
Struts N E Wpatinijava
 
Spring Mvc Rest
Spring Mvc RestSpring Mvc Rest
Spring Mvc RestCraig Walls
 
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4:  JavaServer Pages (JSP) & Expression Language (EL)Lecture 4:  JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)Fahad Golra
 
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Edureka!
 
Ajax Tags Advanced
Ajax Tags AdvancedAjax Tags Advanced
Ajax Tags AdvancedAkramWaseem
 
Spring 3 - Der dritte FrĂŒhling
Spring 3 - Der dritte FrĂŒhlingSpring 3 - Der dritte FrĂŒhling
Spring 3 - Der dritte FrĂŒhlingThorsten Kamann
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJini Lee
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Levelbalassaitis
 
Building and managing java projects with maven part-III
Building and managing java projects with maven part-IIIBuilding and managing java projects with maven part-III
Building and managing java projects with maven part-IIIprinceirfancivil
 
LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in detailsMax Klymyshyn
 
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSAjax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSMax Katz
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892Tuna Tore
 
Liferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic FormsLiferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic FormsWillem Vermeer
 
Dexterity in the Wild
Dexterity in the WildDexterity in the Wild
Dexterity in the WildDavid Glick
 

Was ist angesagt? (20)

Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5Bootstrat REST APIs with Laravel 5
Bootstrat REST APIs with Laravel 5
 
Struts N E W
Struts N E WStruts N E W
Struts N E W
 
Spring Mvc Rest
Spring Mvc RestSpring Mvc Rest
Spring Mvc Rest
 
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4:  JavaServer Pages (JSP) & Expression Language (EL)Lecture 4:  JavaServer Pages (JSP) & Expression Language (EL)
Lecture 4: JavaServer Pages (JSP) & Expression Language (EL)
 
Jsf Ajax
Jsf AjaxJsf Ajax
Jsf Ajax
 
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
 
XPages Mobile, #dd13
XPages Mobile, #dd13XPages Mobile, #dd13
XPages Mobile, #dd13
 
Ajax Tags Advanced
Ajax Tags AdvancedAjax Tags Advanced
Ajax Tags Advanced
 
Spring 3 - Der dritte FrĂŒhling
Spring 3 - Der dritte FrĂŒhlingSpring 3 - Der dritte FrĂŒhling
Spring 3 - Der dritte FrĂŒhling
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
 
Take Your XPages Development to the Next Level
Take Your XPages Development to the Next LevelTake Your XPages Development to the Next Level
Take Your XPages Development to the Next Level
 
Maven II
Maven IIMaven II
Maven II
 
Building and managing java projects with maven part-III
Building and managing java projects with maven part-IIIBuilding and managing java projects with maven part-III
Building and managing java projects with maven part-III
 
LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in details
 
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJSAjax Applications with JSF 2 and New RichFaces 4 - TSSJS
Ajax Applications with JSF 2 and New RichFaces 4 - TSSJS
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892
 
Liferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic FormsLiferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic Forms
 
Dexterity in the Wild
Dexterity in the WildDexterity in the Wild
Dexterity in the Wild
 
REST API Laravel
REST API LaravelREST API Laravel
REST API Laravel
 
Jsf
JsfJsf
Jsf
 

Andere mochten auch

JSF and Seam
JSF and SeamJSF and Seam
JSF and Seamyuvalb
 
Component Framework Primer for JSF Users
Component Framework Primer for JSF UsersComponent Framework Primer for JSF Users
Component Framework Primer for JSF UsersAndy Schwartz
 
Development of web apps based on JSF (TU Vienna)
Development of web apps based on JSF (TU Vienna)Development of web apps based on JSF (TU Vienna)
Development of web apps based on JSF (TU Vienna)blahap
 
Rare old photos
Rare old photosRare old photos
Rare old photosbrucem1967
 
Skills Matter Itbo April2010 Tapestry
Skills Matter Itbo April2010 TapestrySkills Matter Itbo April2010 Tapestry
Skills Matter Itbo April2010 TapestrySkills Matter
 
Bookmarkable JSF: PrettyFaces
Bookmarkable JSF: PrettyFacesBookmarkable JSF: PrettyFaces
Bookmarkable JSF: PrettyFacesLincoln III
 

Andere mochten auch (6)

JSF and Seam
JSF and SeamJSF and Seam
JSF and Seam
 
Component Framework Primer for JSF Users
Component Framework Primer for JSF UsersComponent Framework Primer for JSF Users
Component Framework Primer for JSF Users
 
Development of web apps based on JSF (TU Vienna)
Development of web apps based on JSF (TU Vienna)Development of web apps based on JSF (TU Vienna)
Development of web apps based on JSF (TU Vienna)
 
Rare old photos
Rare old photosRare old photos
Rare old photos
 
Skills Matter Itbo April2010 Tapestry
Skills Matter Itbo April2010 TapestrySkills Matter Itbo April2010 Tapestry
Skills Matter Itbo April2010 Tapestry
 
Bookmarkable JSF: PrettyFaces
Bookmarkable JSF: PrettyFacesBookmarkable JSF: PrettyFaces
Bookmarkable JSF: PrettyFaces
 

Ähnlich wie JSF 2.0 Preview

In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces Skills Matter
 
Andy Bosch - JavaServer Faces in the cloud
Andy Bosch -  JavaServer Faces in the cloudAndy Bosch -  JavaServer Faces in the cloud
Andy Bosch - JavaServer Faces in the cloudAndy Bosch
 
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsRaghavan Mohan
 
Os Haase
Os HaaseOs Haase
Os Haaseoscon2007
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component libraryMax Katz
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemAndres Almiray
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFMax Katz
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen LjuSkills Matter
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen LjuSkills Matter
 
Jsf2 composite-components
Jsf2 composite-componentsJsf2 composite-components
Jsf2 composite-componentsvinaysbk
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationAjax Experience 2009
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitIMC Institute
 
Overview Of Lift Framework
Overview Of Lift FrameworkOverview Of Lift Framework
Overview Of Lift FrameworkXebia IT Architects
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkIndicThreads
 

Ähnlich wie JSF 2.0 Preview (20)

In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
 
Andy Bosch - JavaServer Faces in the cloud
Andy Bosch -  JavaServer Faces in the cloudAndy Bosch -  JavaServer Faces in the cloud
Andy Bosch - JavaServer Faces in the cloud
 
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorials
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Resthub
ResthubResthub
Resthub
 
RichFaces: rich:* component library
RichFaces: rich:* component libraryRichFaces: rich:* component library
RichFaces: rich:* component library
 
vJUG - The JavaFX Ecosystem
vJUG - The JavaFX EcosystemvJUG - The JavaFX Ecosystem
vJUG - The JavaFX Ecosystem
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
User Interface
User InterfaceUser Interface
User Interface
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
Let's react - Meetup
Let's react - MeetupLet's react - Meetup
Let's react - Meetup
 
Jsf2 composite-components
Jsf2 composite-componentsJsf2 composite-components
Jsf2 composite-components
 
Laurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus PresentationLaurens Van Den Oever Xopus Presentation
Laurens Van Den Oever Xopus Presentation
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Json generation
Json generationJson generation
Json generation
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
 
Overview Of Lift Framework
Overview Of Lift FrameworkOverview Of Lift Framework
Overview Of Lift Framework
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web Framework
 

Mehr von Skills Matter

5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard LawrenceSkills Matter
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applicationsSkills Matter
 
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmScala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmSkills Matter
 
Oscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimOscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimSkills Matter
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Skills Matter
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlSkills Matter
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsSkills Matter
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Skills Matter
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Skills Matter
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldSkills Matter
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Skills Matter
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Skills Matter
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingSkills Matter
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveSkills Matter
 
Serendipity-neo4j
Serendipity-neo4jSerendipity-neo4j
Serendipity-neo4jSkills Matter
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSkills Matter
 
Lug presentation
Lug presentationLug presentation
Lug presentationSkills Matter
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tSkills Matter
 

Mehr von Skills Matter (20)

5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence5 things cucumber is bad at by Richard Lawrence
5 things cucumber is bad at by Richard Lawrence
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applications
 
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvmScala e xchange 2013 haoyi li on metascala a tiny diy jvm
Scala e xchange 2013 haoyi li on metascala a tiny diy jvm
 
Oscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheimOscar reiken jr on our success at manheim
Oscar reiken jr on our success at manheim
 
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberl
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.js
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source world
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testing
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-dive
 
Serendipity-neo4j
Serendipity-neo4jSerendipity-neo4j
Serendipity-neo4j
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
 
Plug 20110217
Plug   20110217Plug   20110217
Plug 20110217
 
Lug presentation
Lug presentationLug presentation
Lug presentation
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_t
 
Plug saiku
Plug   saikuPlug   saiku
Plug saiku
 

KĂŒrzlich hochgeladen

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...gurkirankumar98700
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

KĂŒrzlich hochgeladen (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

JSF 2.0 Preview

  • 2. About Me Apache MyFaces PMC Member Co-author of “The DeïŹnitive Guide to Apache MyFaces and Facelets” Reference in “Core JSF 2nd Edition” Recognized speaker in international and local conferences (JSFOne, JSFDays...) Oracle RCF Member Krank Framework committer JSF Chart Creator Author YUI4JSF Project Lead FacesTrace Project Lead FC Barcelona Fan Working for SpringSource
  • 3. Agenda Overview of JSF 1.x Overview JSF 2.0 What is new? Future of JSF
  • 4. JSF 1.x Overview Component Oriented JSF 1.0, 1.1 and 1.2 Standard (jsr 127 and 252) Two implementations Apache MyFaces Mojarra (RI)
  • 5. JSF 1.x - The Good Component oriented Extendible Third party components (Trinidad, Tomahawk, RichFaces, IceFaces ...) Rapid application development Vendor and Tool support
  • 6. JSF 1.x - The Bad JSP based Performance Not very rich Exception handling Too much xml A bit more...
  • 7. JSF 2.0 Overview JSR 314 Part of JEE 6 New features, improvements and ïŹxes InïŹ‚uenced by community and trends Other web frameworks, Ajax, JSF extensions, Component libs, blogs etc...
  • 8. Roadmap JSR process started in July, 2007 Early Draft Review 1 ïŹnished on July 2008 Early Draft Review 2 ïŹnished on Oct 2008 Proposed Final Draft Date, December 2008 Timed with JEE 6
  • 9. So What’s New? AJAX Easy Component Development Resource Loading PDL (Page Description Language) More Scopes Less conïŹguration
  • 10. More Component interoperability Scripting (Groovy) Zero deployment time System Events Project Stage Client side validation
  • 11. More... Bookmarks Exception handling Improved State Management Extension Prioritization
  • 12. Resource Handling What is a resource? css, javascript, images ... A resource has; library, version, locale, name Two new classes javax.faces.application.Resource javax.faces.application.ResourceHandler Load from; /resources /META-INF/resources
  • 13. Resource Handling Resource Format [localePreïŹx/] [libraryName/] [libraryVersion/] resourceName [/resourceVersion] Examples Under /resources or /META-INF/resources - tr/mycoolcomponentlib/1.0/logo.png - mycoolcomponentlib/1.0/widget.js/1.0.js - mycoolcomponentlib/styles.css Ability to load from classpath
  • 14. Resources and Custom Components @ResourceDependency(name=”ajaxsuggest.js”, library=”mycoolcomponentlib”) public class InputSuggest extends UIInput {...} OR @ResourceDependencies({ @ResourceDependency(name=”ajaxsuggest.js”, library=”mycoolcomponentlib”) @ResourceDependency(name=”ajaxsuggest.css”, library=”mycoolcomponentlib”))} public class InputSuggest extends UIInput {...} OR Application app = FacesContext.getCurrentInstance().getApplication(); Resource resource= app.getResourceHandler().createResource(“suggest.js”,”lib”); writer.write(“<script ...”); //encode using request.getRequestPath();
  • 15. Resource Location 4 new tags; h:head h:body h:outputScript h:outputStyleSheet Example ... <h:head> </h:head> <h:body> <h:outputScript name=”suggest.js” target=”head” /> </h:body> ...
  • 17. Ajax Standard JSF-Ajax integration Javascript API for Ajax namespace : javax.faces (Open Ajax Alliance) script: ajax.js
  • 18. Ajax Request javax.faces.Ajax.ajaxRequest(element,event,options) <h:commandButton id=”btn” value=”Submit” action=”#{itemController.newItem}” onclick=”javax.faces.Ajax.ajaxRequest(this,event, {execute:this.id, render:’comp1’})”> </h:commandButton> Include ajax.js <h:outputScript name=”ajax.js” library=”javax.faces” target=”head” /> OR <h:outputAjaxScript target=”head” />
  • 19. Ajax and Custom Components Include ajax.js with annotation @AjaxDependency(target=”head”) public class MyAjaxComponent extends UIInput { } Or with ResourceHandler ResourceHandler.createAjaxResource();
  • 21. ConïŹguration Annotations instead of xml <managed-bean> <managed-bean-name>createBookController</managed-bean-name> <managed-bean-class> com.bla.bla.view.MyPojo </managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> becomes @ManagedBean(name=”myPojo”) @RequestScoped public class MyPojo { ... }
  • 22. ConïŹguration More annotations @FacesComponent @FacesConverter @ManagedBean @ManagedBeans @ManagedProperty @FacesRenderer @FacesRenderKit @FacesValidator More soon...
  • 23. Project Stage Project environment setting Similar to RAILS_ENV Values; Development UnitTest SystemTest Production (Default)
  • 24. Project Stage web.xml <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> JNDI java:comp/env/jsf/ProjectStage How to get it? Application.getProjectStage()
  • 26. System Events Subscription based, no queueing A bit similar to PhaseEvent idea Ingridients System Events System Event Listeners Subscribers (Application or UIComponent)
  • 27. System Events Application level system events public abstract void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener); public abstract void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class sourceClass, SystemEventListener listener); public abstract void publishEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListenerHolder source); public void publishEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source);
  • 28. System Events UIComponent level system events public void subscribeToEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener); public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener); AfterAddToParentEvent BeforeRenderEvent ComponentSystemEvent ViewMapCreatedEvent ViewMapDestroyedEvent
  • 29. System Events Listen with annotations @ListenerFor(systemEventClass=AfterAddToParentEvent.class) public class MyComponent extends UIOutput {} @ListenersFor({ @ListenerFor(systemEventClass=AfterAddToParentEvent.class, @ListenerFor(systemEventClass=BeforeRenderEvent.class)}) public class MyComponent extends UIOutput {}
  • 30. Scopes ViewScope For managed beans Component scope Composition Conversation scope Not in yet, through webbeans?
  • 31. Scopes - ViewScope A new managed bean scope Lives until view is changed @ManagedBean(name=”myBean”) @ViewScoped public class MyBeanInViewScope { ... }
  • 33. PDL Page Declaration Language Based on Facelets <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <title>JSF2Demo</title> </h:head> <h:body> <h:form> <h:outputText value="Hello" /> </h:form> </h:body> </html>
  • 34. EZComp Greatly simpliïŹes custom component development Convention over conïŹguration Declarative composite components Components without Java coding Component scope in composition
  • 35. EZComp Page that uses a composition component <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:jwug="http://java.sun.com/jsf/composite/jwug"> <h:head> <title>EZComp Demo</title> </h:head> <h:body> <h:form> <jwug:greeting value=”Mr. Soprano” /> </h:form> </h:body> </html>
  • 36. EZComp Under %webroot%/resources/jwug/greeting.xhtml <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" xmlns:composite="http://java.sun.com/jsf/composite"> <body> <composite:interface> <composite:attribute name="value" required="true" /> </composite:interface> <composite:implementation> <h:outputText value=”Hello #{compositeComponent.attrs.value}” /> </composite:implementation> </body> </html>
  • 37. EZComp - Slider Scriptaculous based slider <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:jwug="http://java.sun.com/jsf/composite/jwug"> <h:head> <title>EZComp Demo</title> </h:head> <h:body> <h:form> <jwug:slider value=”#{demo.number}” min=”0” max=”100”/> </h:form> </h:body> </html>
  • 38. EZComp - Slider <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <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" xmlns:composite="http://java.sun.com/jsf/composite"> <body> <composite:interface> <composite:attribute name="id" required="true" /> <composite:attribute name="value" required="true" /> <composite:attribute name="min" required="false" /> <composite:attribute name="max" required="false" /> </composite:interface> <composite:implementation> <h:outputScript name="prototype.js" library="script" target="head"/> <h:outputScript name="scriptaculous.js" library="script" target="head"/> <h:inputText id="sliderField" style="width:100px" value="#{compositeComponent.attrs.value}"></h:inputText> <div id="#{compositeComponent.clientId}_track" style="width:105px;background-color:#aaa;height:5px;"> <div id="#{compositeComponent.clientId}_handle" style="width:5px;height:10px;background-color:#f00;cursor:move;"></div> </div> <script type="text/javascript"> var slider_#{compositeComponent.attrs.id} = new Control.Slider('#{compositeComponent.clientId}_handle','#{compositeComponent.clientId}_track',{range: $R(#{compositeComponent.attrs.min},#{compositeComponent.attrs.max})}); slider_#{compositeComponent.attrs.id}.options.onSlide = function(value){ $('#{compositeComponent.clientId}:sliderField').value = (value + '').split(".")[0]; };</script> </composite:implementation> </body> </html>
  • 40. Scripting JSF Groovy instead of Java Zero deployment time Reload faces-conïŹg Scripted beans, renderers, validators and etc
  • 41. From JSF 2.0 Issue Tracker Optimized state management Exception Handling Bookmarks SelectItems Skinning Partial validation Security more...
  • 42. MyFaces 2.0 Being worked on... JSF 2.0 branch created Not to be late this time
  • 43. Future of JSF More component libraries JSF in EE (WebBeans, Seam, Spring Faces ...) More RIA integration (Flex, Ajax ...) Tool support More adaptation
  • 44. Resources JSF 2.0 EG blog : http://blogs.jsfcentral.com/jsf2group Ed Burns’s blog: http://weblogs.java.net/blog/edburns/ Ryan Lubke’s blog: http://blogs.sun.com/rlubke/ Jim Driscoll’s blog: http://weblogs.java.net/blog/driscoll/ JSR Page: http://jcp.org/en/jsr/detail?id=314
  • 45. The End - Cheers! http://cagataycivici.wordpress.com cagatay@apache.org PS3 Network id: FacesContext