SlideShare a Scribd company logo
Prime Time JSF with
PrimeFaces
Who uses PrimeFaces?
Who uses PrimeFaces?
Who uses PrimeFaces?
Who uses PrimeFaces?
Who uses PrimeFaces?
Popularity
100+ UI Components
Advanced UIs
Form Components
Hide Complexity
Keep Flexibility
<p:tabView onTabChange=”handleTabChange()”>
<p:ajax event=”change” listener=”#{bean.onTabChange}” update=”comp” />
//tabs
</p:tabView>
CSS
Override
JS
API
Client
Callbacks
Ajax
Callbacks
CSS JS AJAX
JSON
<p:schedule id="schedule" value="#{scheduleView.eventModel}"
widgetVar="myschedule">
Page
<div id="j_idt5:myschedule" …
</div>
Markup
<script type=”text/javascript”>
$(function()
{PrimeFaces.cw("Schedule","myschedule",
{id:”form:schedule",widgetVar:"myschedule",defaultView:"month",
locale:"en”,offset:0,header:{left:'prev,next,today',
center:"title",right:"month,agendaWeek,agendaDay”},"schedule");});
</script>
Script
Anatomy of a Component
HTML5
canvas
data-*
websockets
forms media
Server APIs: Standard JSF 2
Client APIs:
PrimeFaces Ajax
f:ajax
onevent
onerror
PrimeFaces Ajax
JS Event handlers
p:ajax
oncomplete
onerror
onstart
async
global
onsuccess
p:ajax
<p:ajax event=“blur”
update=“userComponent”
process=“@this”/>
f:ajax
<f:ajax event=“blur”
render=“userComponent”
execute=“@this”/>
a4j:ajax (RichFaces 3.x)
<a4j:support event=“blur”
reRender=“userComponent”/>
<p:ajaxStatus>
<f:facet name=”start”>
<p:graphicImage value=”fancyanimation.gif” />
</f:facet>
<f:facet name=”complete”>
<h:outputText value=”Request Completed” />
</f:facet>
</p:ajaxStatus>
<p:ajaxStatus onstart=”dialog.show()” oncomplete=”dialog.hide()” />
<p:commandButton global=”true|false” />
Declarative
Programmatic
Global
AjaxStatus
<p:growl id=”messages” />
<p:commandButton value=”Save” update=”messages” />
<p:commandButton value=”Update” update=”messages” />
<p:commandButton value=”Delete” update=”messages” />
<p:growl id=”messages” autoUpdate=”true”/>
<p:commandButton value=”Save” />
<p:commandButton value=”Update” />
<p:commandButton value=”Delete” />
AutoUpdate
Ajax Update Keywords
Copyright (C) 2012 Virtua, Inc. All rights reserved.
Keyword Type
@this Standard
@form Standard
@none Standard
@namingcontainer PrimeFaces
@parent PrimeFaces
@composite PrimeFaces
@child(n) PrimeFaces
@previous PrimeFaces
@widgetVar(name) PrimeFaces
update=”@(form)”
update=”@(form.first)”
update=”@(.mystyle)”
update=”@(.ui-datatable)”
update=”@(:input:not(select))”
update=”@(:input:disabled))”
PrimeFaces Selectors
(PFS)
Themes
Install a Theme
Add primefaces-{themename}.jar
Configure
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>{themename}</param-value>
</context-param>
Roll Your Own
Advanced Themes
Demo:
Showcase
Client-side Validation
Copyright (C) 2012 Virtua, Inc. All rights reserved.
<h:form>
<p:messages />
<p:inputText required="true" />
<p:inputTextarea required="true" />
<p:commandButton value="Save"
validateClient="true" ajax="false"/>
</h:form>
Instant Validation with
Events
Copyright (C) 2012 Virtua, Inc. All rights reserved.
<h:form>
<h:panelGrid columns="4" cellpadding="5">
<h:outputLabel for="text" value="Text: (Change)" />
<p:inputText id="text" value="#{validationBean.text}" required="true">
<f:validateLength minimum="2" maximum="5" />
<p:clientValidator />
</p:inputText>
<p:message for="text" display="icon" />
<h:outputText value="#{validationBean.text}" />
<h:outputLabel for="integer" value="Integer: (Keyup)" />
<p:inputText id="integer" value="#{validationBean.integer}">
<p:clientValidator event="keyup"/>
</p:inputText>
<p:message for="integer" display="icon" />
<h:outputText value="#{validationBean.integer}" />
</h:panelGrid>
<p:commandButton value="Save" ajax="false" icon="ui-icon-check"
validateClient="true"/>
</h:form>
Client-side Validation
Messages are fully integrated
API for writing custom client-side validators and
converters
Locale object available in JavaScript
Copyright (C) 2012 Virtua, Inc. All rights reserved.
Bean Validation Integration
Copyright (C) 2012 Virtua, Inc. All rights reserved.
public class Bean {
@NotNull
@Max(30)
private String name;
…
}
<p:inputText value="#{bean.firstname}" />
<input type="text" maxlength="30" …
/>
Other Features
JavaScript API
Accessibility
Right-to-left support
Exception handler
Dialog framework
Page authorization
PrimeFaces Extensions
…
Copyright (C) 2012 Virtua, Inc. All rights reserved.
550+ Pages
Documentation
Books
Copyright (C) 2012 Virtua, Inc. All rights reserved.
Community
Bundled with NetBeans
Enterprise
PrimeTek Informatics

More Related Content

Similar to Primefaces.ppt

Big Data for each one of us
Big Data for each one of usBig Data for each one of us
Big Data for each one of usOSCON Byrum
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Treeadamlogic
 
Stripes Framework
Stripes FrameworkStripes Framework
Stripes Framework
Johannes Carlén
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
Skills Matter
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen LjuSkills Matter
 
BPM-2 Introduction to Advanced Workflows
BPM-2 Introduction to Advanced WorkflowsBPM-2 Introduction to Advanced Workflows
BPM-2 Introduction to Advanced Workflows
Alfresco Software
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
Alexander Zamkovyi
 
Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017
Max Pronko
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauSpiffy
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
Francois Zaninotto
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
Jennifer Bourey
 
Building complex User Interfaces with Sitecore and React
Building complex User Interfaces with Sitecore and ReactBuilding complex User Interfaces with Sitecore and React
Building complex User Interfaces with Sitecore and React
Jonne Kats
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
Jini Lee
 
Unobtrusive JavaScript
Unobtrusive JavaScriptUnobtrusive JavaScript
Unobtrusive JavaScript
Vitaly Baum
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
Rob Bontekoe
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJS
David Lapsley
 
Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
Marco Otte-Witte
 
BPM-1 Introduction to Advanced Workflows
BPM-1 Introduction to Advanced WorkflowsBPM-1 Introduction to Advanced Workflows
BPM-1 Introduction to Advanced Workflows
Alfresco Software
 

Similar to Primefaces.ppt (20)

Jsf
JsfJsf
Jsf
 
Big Data for each one of us
Big Data for each one of usBig Data for each one of us
Big Data for each one of us
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
 
Stripes Framework
Stripes FrameworkStripes Framework
Stripes Framework
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
Primefaces Nextgen Lju
Primefaces Nextgen LjuPrimefaces Nextgen Lju
Primefaces Nextgen Lju
 
BPM-2 Introduction to Advanced Workflows
BPM-2 Introduction to Advanced WorkflowsBPM-2 Introduction to Advanced Workflows
BPM-2 Introduction to Advanced Workflows
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017Checkout Customizations in Magento 2 - MageTitansMCR 2017
Checkout Customizations in Magento 2 - MageTitansMCR 2017
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
Building complex User Interfaces with Sitecore and React
Building complex User Interfaces with Sitecore and ReactBuilding complex User Interfaces with Sitecore and React
Building complex User Interfaces with Sitecore and React
 
Javatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparisonJavatwo2012 java frameworkcomparison
Javatwo2012 java frameworkcomparison
 
Unobtrusive JavaScript
Unobtrusive JavaScriptUnobtrusive JavaScript
Unobtrusive JavaScript
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Jsf intro
Jsf introJsf intro
Jsf intro
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJS
 
Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
 
BPM-1 Introduction to Advanced Workflows
BPM-1 Introduction to Advanced WorkflowsBPM-1 Introduction to Advanced Workflows
BPM-1 Introduction to Advanced Workflows
 

More from Patiento Del Mar

benchmarkdotnet-powerful-170413040412.pdf
benchmarkdotnet-powerful-170413040412.pdfbenchmarkdotnet-powerful-170413040412.pdf
benchmarkdotnet-powerful-170413040412.pdf
Patiento Del Mar
 
Managed Extenibility Framework in C# - MEF
Managed Extenibility Framework  in C#  - MEFManaged Extenibility Framework  in C#  - MEF
Managed Extenibility Framework in C# - MEF
Patiento Del Mar
 
grpc_tutorial.pdf
grpc_tutorial.pdfgrpc_tutorial.pdf
grpc_tutorial.pdf
Patiento Del Mar
 
0.coursGitEclipse.pdf
0.coursGitEclipse.pdf0.coursGitEclipse.pdf
0.coursGitEclipse.pdf
Patiento Del Mar
 
hibernateormoverview-140501154227-phpapp02.pdf
hibernateormoverview-140501154227-phpapp02.pdfhibernateormoverview-140501154227-phpapp02.pdf
hibernateormoverview-140501154227-phpapp02.pdf
Patiento Del Mar
 
hibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfhibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdf
Patiento Del Mar
 
Spring Data Advanced Querying.ppt
Spring Data Advanced Querying.pptSpring Data Advanced Querying.ppt
Spring Data Advanced Querying.ppt
Patiento Del Mar
 
Thymeleaf and Spring Controllers.ppt
Thymeleaf and Spring Controllers.pptThymeleaf and Spring Controllers.ppt
Thymeleaf and Spring Controllers.ppt
Patiento Del Mar
 
Spring Security.ppt
Spring Security.pptSpring Security.ppt
Spring Security.ppt
Patiento Del Mar
 
momjms.pdf
momjms.pdfmomjms.pdf
momjms.pdf
Patiento Del Mar
 
synchronization.pdf
synchronization.pdfsynchronization.pdf
synchronization.pdf
Patiento Del Mar
 
cours6.pdf
cours6.pdfcours6.pdf
cours6.pdf
Patiento Del Mar
 
java_PAR.pdf
java_PAR.pdfjava_PAR.pdf
java_PAR.pdf
Patiento Del Mar
 
11-Concurrence-Section critiques.pdf
11-Concurrence-Section critiques.pdf11-Concurrence-Section critiques.pdf
11-Concurrence-Section critiques.pdf
Patiento Del Mar
 
22-reflection.pdf
22-reflection.pdf22-reflection.pdf
22-reflection.pdf
Patiento Del Mar
 
16-Concurrence-APIs-Concurrentes.pdf
16-Concurrence-APIs-Concurrentes.pdf16-Concurrence-APIs-Concurrentes.pdf
16-Concurrence-APIs-Concurrentes.pdf
Patiento Del Mar
 
12-Concurrence-Rendez-vous.pdf
12-Concurrence-Rendez-vous.pdf12-Concurrence-Rendez-vous.pdf
12-Concurrence-Rendez-vous.pdf
Patiento Del Mar
 
17-Concurrence-Fork-Join.pdf
17-Concurrence-Fork-Join.pdf17-Concurrence-Fork-Join.pdf
17-Concurrence-Fork-Join.pdf
Patiento Del Mar
 
13-Concurrence-Producteur-consommateur.pdf
13-Concurrence-Producteur-consommateur.pdf13-Concurrence-Producteur-consommateur.pdf
13-Concurrence-Producteur-consommateur.pdf
Patiento Del Mar
 

More from Patiento Del Mar (20)

benchmarkdotnet-powerful-170413040412.pdf
benchmarkdotnet-powerful-170413040412.pdfbenchmarkdotnet-powerful-170413040412.pdf
benchmarkdotnet-powerful-170413040412.pdf
 
Managed Extenibility Framework in C# - MEF
Managed Extenibility Framework  in C#  - MEFManaged Extenibility Framework  in C#  - MEF
Managed Extenibility Framework in C# - MEF
 
grpc_tutorial.pdf
grpc_tutorial.pdfgrpc_tutorial.pdf
grpc_tutorial.pdf
 
0.coursGitEclipse.pdf
0.coursGitEclipse.pdf0.coursGitEclipse.pdf
0.coursGitEclipse.pdf
 
hibernateormoverview-140501154227-phpapp02.pdf
hibernateormoverview-140501154227-phpapp02.pdfhibernateormoverview-140501154227-phpapp02.pdf
hibernateormoverview-140501154227-phpapp02.pdf
 
hibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdfhibernateormfeatures-140223193044-phpapp02.pdf
hibernateormfeatures-140223193044-phpapp02.pdf
 
Spring Data Advanced Querying.ppt
Spring Data Advanced Querying.pptSpring Data Advanced Querying.ppt
Spring Data Advanced Querying.ppt
 
Thymeleaf and Spring Controllers.ppt
Thymeleaf and Spring Controllers.pptThymeleaf and Spring Controllers.ppt
Thymeleaf and Spring Controllers.ppt
 
Spring Security.ppt
Spring Security.pptSpring Security.ppt
Spring Security.ppt
 
momjms.pdf
momjms.pdfmomjms.pdf
momjms.pdf
 
rmi.pdf
rmi.pdfrmi.pdf
rmi.pdf
 
synchronization.pdf
synchronization.pdfsynchronization.pdf
synchronization.pdf
 
cours6.pdf
cours6.pdfcours6.pdf
cours6.pdf
 
java_PAR.pdf
java_PAR.pdfjava_PAR.pdf
java_PAR.pdf
 
11-Concurrence-Section critiques.pdf
11-Concurrence-Section critiques.pdf11-Concurrence-Section critiques.pdf
11-Concurrence-Section critiques.pdf
 
22-reflection.pdf
22-reflection.pdf22-reflection.pdf
22-reflection.pdf
 
16-Concurrence-APIs-Concurrentes.pdf
16-Concurrence-APIs-Concurrentes.pdf16-Concurrence-APIs-Concurrentes.pdf
16-Concurrence-APIs-Concurrentes.pdf
 
12-Concurrence-Rendez-vous.pdf
12-Concurrence-Rendez-vous.pdf12-Concurrence-Rendez-vous.pdf
12-Concurrence-Rendez-vous.pdf
 
17-Concurrence-Fork-Join.pdf
17-Concurrence-Fork-Join.pdf17-Concurrence-Fork-Join.pdf
17-Concurrence-Fork-Join.pdf
 
13-Concurrence-Producteur-consommateur.pdf
13-Concurrence-Producteur-consommateur.pdf13-Concurrence-Producteur-consommateur.pdf
13-Concurrence-Producteur-consommateur.pdf
 

Primefaces.ppt

Editor's Notes

  1. DataTable, Sheet, Charts, Gmaps, Rating, MindMap, Input, Layout - Mailbox